File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ _wgeturl=" https://github.com/google/fonts/archive/master.tar.gz"
2+ _gf=" hindsiliguri"
3+
4+ # install wget
5+ sudo apt-get install wget
6+
7+ # make sure a file with the same name doesn't already exist
8+ rm -f $_gf .tar.gz
9+
10+ echo " Connecting to Github server..."
11+ wget $_wgeturl -O $_gf .tar.gz
12+
13+ echo " Extracting the downloaded archive..."
14+ tar -xf $_gf .tar.gz
15+
16+ echo " Creating the /usr/share/fonts/truetype/$_gf folder"
17+ sudo mkdir -p /usr/share/fonts/truetype/$_gf
18+
19+ echo " Installing all .ttf fonts in /usr/share/fonts/truetype/$_gf "
20+ find $PWD /fonts-master/ -name " *.ttf" -exec sudo install -m644 {} /usr/share/fonts/truetype/google-fonts/ \; || return 1
21+
22+ echo " Updating the font cache"
23+ fc-cache -f > /dev/null
24+
25+ # clean up, but only the .tar.gz, the user may need the folder
26+ rm -f $_gf .tar.gz
27+
28+ echo " Done."
You can’t perform that action at this time.
0 commit comments