-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathInteractInstall.sh
More file actions
58 lines (40 loc) · 1.62 KB
/
InteractInstall.sh
File metadata and controls
58 lines (40 loc) · 1.62 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/bash
PASSWD = "@chen1013"
echo -e "1、系统更新....\n"
echo ${PASSWD} | sudo -S apt update -y
echo ${PASSWD} | sudo -S apt upgrade -y
echo -e "2、安装字体 文泉驿微米黑 .............\n"
echo ${PASSWD} | sudo -S apt install fonts-wqy-microhei -y
echo ${PASSWD} | sudo -S apt install fonts-wqy-zenhei -y
echo -e "3、安装字体 微软字体、宋体等 ............. \n"
echo ${PASSWD} | sudo -S apt install ttf-mscorefonts-installer -y
echo ${PASSWD} | sudo -S fc-cache -f -v
echo -e "4、安装字体 FiraCode 等............. \n"
firacode_font_dir="/usr/share/fonts/truetype/firacode"
if [ ! -d "${firacode_font_dir}" ]; then
echo "mkdir -p ${firacode_font_dir}"
mkdir -p "${firacode_font_dir}"
else
echo "Found fonts dir ${firacode_font_dir}"
fi
for type in Bold Light Medium Regular Retina; do
file_path="${firacode_font_dir}/FiraCode-${type}.ttf"
file_url="https://github.com/tonsky/FiraCode/blob/master/distr/ttf/FiraCode-${type}.ttf?raw=true"
if [ ! -e "${file_path}" ]; then
echo "wget -O $file_path $file_url"
wget -O "${file_path}" "${file_url}"
else
echo "Found existing file $file_path"
fi;
done
echo "fc-cache -f"
echo ${PASSWD} | sudo -S fc-cache -f -v
echo -e "5、安装字体 Nerd Fonts 等............. \n"
echo -e "去https://www.nerdfonts.com/font-downloads下载字体,存放在~/下载/nerdfonts/下 \n"
nerd_font_dir="/usr/share/fonts/truetypes/nerdfonts"
if [ ! -d "${nerd_font_dir}" ]; then
echo "mkdir -p ${nerd_font_dir}"
mkdir -p "${nerd_font_dir}"
else
echo "目录已经存在 ${nerd_font_dir}"
fi