forked from yakumioto/YaHei-Consolas-Hybrid-1.12
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·32 lines (20 loc) · 806 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
#!/bin/sh
if [ ! $(command -v wget) ]; then
echo "please install wget"
exit 0
elif [ $UID -ne 0 ]; then
echo "You need to use root."
exit 0
else
wget -P /tmp/ https://github.com/yakumioto/YaHei-Consolas-Hybrid-1.12/raw/master/YaHei%20Consolas%20Hybrid%201.12.ttf
echo 'Truetype folder Creating...'
echo 'path:/usr/share/fonts/truetype/YaHei\ Consolas\ Hybrid'
mkdir -p /usr/share/fonts/truetype/YaHei\ Consolas\ Hybrid
echo 'Move font to truetype folder...'
mv /tmp/YaHei\ Consolas\ Hybrid\ 1.12.ttf /usr/share/fonts/truetype/YaHei\ Consolas\ Hybrid
echo 'Modifying font permissions...'
chmod 644 /usr/share/fonts/truetype/YaHei\ Consolas\ Hybrid/YaHei\ Consolas\ Hybrid\ 1.12.ttf
echo 'installing YaHei Consolas Hybrid font...'
fc-cache -fv
echo 'Complete!'
fi