forked from hbin/top-programming-fonts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
41 lines (31 loc) · 914 Bytes
/
install.sh
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
39
40
41
#!/bin/bash
FONTS_DIR=$HOME/.fonts
TOP_FONTS=("Menlo-Regular.ttf" "Monaco-Linux.ttf" "DejaVuSansMono.ttf" "3270Medium.otf" "FiraCode-Regular.ttf" "Inconsolata-Regular.ttf")
function die () {
echo "${@}"
exit 1
}
cat <<EOF
--------------------------
Top Programming Fonts!
--------------------------
- Created and maintained by hbin
EOF
# Create font dir if not exists
if [[ ! -e $FONTS_DIR ]]; then
mkdir $FONTS_DIR || die "Could not make $FONTS_DIR"
fi
for i in ${TOP_FONTS[*]}; do
echo "Downloading $i"; echo
wget -c https://github.com/hbin/top-programming-fonts/raw/master/$i \
|| die "Fail to download ${i}"
mv $i $FONTS_DIR || die "Could not install $i"
echo "Installed $i successfully"; echo
done
cat <<EOF
--------------------------
Fonts installed! Enjoy!
--------------------------
- If you have any question, pls
mail to <[email protected]>
EOF