-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfonts.sh
More file actions
executable file
·38 lines (27 loc) · 1.21 KB
/
Copy pathfonts.sh
File metadata and controls
executable file
·38 lines (27 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
set -e
FIRA_URL="https://github.com/ryanoasis/nerd-fonts/releases/download/v3.4.0/FiraCode.zip"
HACK_URL="https://github.com/ryanoasis/nerd-fonts/releases/download/v3.4.0/Hack.zip"
SYS_FONT_DIR="/usr/share/fonts"
TMP_DIR="/tmp/nerd-fonts-install"
echo "--- Instalando Nerd Fonts Globalmente (/usr/share/fonts) ---"
sudo mkdir -p "$SYS_FONT_DIR/FiraCode"
sudo mkdir -p "$SYS_FONT_DIR/Hack"
mkdir -p "$TMP_DIR"
sudo apt update && sudo apt install -y unzip curl
echo "Baixando FiraCode..."
curl -L "$FIRA_URL" -o "$TMP_DIR/FiraCode.zip"
sudo unzip -o "$TMP_DIR/FiraCode.zip" -d "$SYS_FONT_DIR/FiraCode"
echo "Baixando Hack..."
curl -L "$HACK_URL" -o "$TMP_DIR/Hack.zip"
sudo unzip -o "$TMP_DIR/Hack.zip" -d "$SYS_FONT_DIR/Hack"
echo "Ajustando permissões e limpando arquivos extras..."
sudo find "$SYS_FONT_DIR" -type f ! -name "*.ttf" ! -name "*.otf" -delete
sudo chmod 644 "$SYS_FONT_DIR"/*/*.ttf
echo "Atualizando cache de fontes global..."
sudo fc-cache -fv
rm -rf "$TMP_DIR"
echo "----------------------------------------------------------"
echo "✅ Fontes instaladas em: $SYS_FONT_DIR"
echo "Disponível para todos os usuários do Linux Mint."
echo "----------------------------------------------------------"