-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall.sh
73 lines (61 loc) · 1.7 KB
/
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# Check this distrubution is Arch based or not
if [ -f /etc/arch-release ]; then
echo "\n Solve emoji show on Arch Linux with KDE Plasma!"
else
echo "\n This is not Arch based distribution"
exit 1
fi
# Check desktop environment is KDE Plasma or not
if [ -f /usr/bin/plasmashell ]; then
echo "\n ----------------------------------------------"
else
echo "\n This is not KDE Plasma"
exit 1
fi
# Check user has root permission or not
if [ "$EUID" -ne 0 ]; then
echo "\n Please run as root"
exit 1
fi
#Check Internet connection with archlinux.org ping
if ping -c 1 archlinux.org >/dev/null; then
echo "\n Internet connection is OK"
else
echo "\n Internet connection is not OK"
exit 1
fi
# Check user has installed noto-fonts-emoji or not
if pacman -Qi noto-fonts-emoji >/dev/null; then
echo "\n noto-fonts-emoji is already installed"
else
echo "\n Installing noto-fonts-emoji"
pacman -S noto-fonts-emoji --noconfirm
fi
# ask user solve show emoji for all user or this user only
echo "\n Do you want to solve show emoji for all user or this user only?"
echo " 1. All user"
echo " 2. This user only"
read -p " Please enter your choice: " choice
if [ $choice -eq 1 ]; then
config="$HOME/.config/fontconfig/fonts.conf"
elif [ $choice -eq 2 ]; then
config="/etc/fonts/local.conf"
else
echo "\n Invalid choice"
exit 1
fi
# cp -r ./font_config.conf to $config
cp -r ./font_config.conf $config
if [ $? -eq 0 ]; then
echo "\n Success"
else
echo "\n Error"
exit 1
fi
# Update font cache
fc-cache -f -v
echo "\n Success"
echo "\n Please logout or reboot to apply changes"
echo "\n ----------------------------------------------"
echo "\n"
echo "GitHub: Mohuva13"