-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfonts.sh
More file actions
executable file
·31 lines (24 loc) · 822 Bytes
/
fonts.sh
File metadata and controls
executable file
·31 lines (24 loc) · 822 Bytes
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
#!/bin/bash
# todo - git cloning the fonts repo
echo $(git clone https://github.com/swaroopRajwal/fonts.git)
# todo - creating fonts directory and zipping each font in /.local/share/fonts
files=`ls fonts/*.zip`
# ? checking if the fonts directory exists in
# ? /home/user/.local/share/fonts
# ? if it does then proceeding further
# ? if it doesn't then creating it XD
if [[ -d "/home/$USER/.local/share/fonts/" ]]; then
echo "fonts directory exitst"
else
echo $(cd /home/$USER/.local/share/ && mkdir fonts/)
fi
# * extracting the files in /home/user/.local/share/fonts
for entry in $files
do
file_name=$(basename "$entry")
font_dir="/home/$USER/.local/share/fonts/${file_name%.*}"
echo $(mkdir "$font_dir")
echo $(unzip $entry -d $font_dir)
done
# * deleting the cloned repo
echo $(rm -rf fonts)