forked from PapirusDevelopmentTeam/papirus-icon-theme
-
Notifications
You must be signed in to change notification settings - Fork 4
/
install-papirus-home-gtk.sh
executable file
·69 lines (50 loc) · 1.86 KB
/
install-papirus-home-gtk.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
#!/bin/sh
set -e
gh_repo="papirus-icon-theme"
gh_desc="Papirus icon theme GTK"
cat <<- EOF
ppppp ii
pp pp aaaaa ppppp rr rrr uu uu sssss
ppppp aa aa pp pp ii rrrr uu uu ssss
pp aa aa pp pp ii rr uu uu ssss
pp aaaaa ppppp ii rr uuuuu sssss
pp
pp
$gh_desc
https://github.com/PapirusDevelopmentTeam/$gh_repo
EOF
temp_dir=$(mktemp -d)
echo "=> Getting the latest version from GitHub ..."
wget -O "/tmp/$gh_repo.tar.gz" \
https://github.com/PapirusDevelopmentTeam/$gh_repo/archive/master.tar.gz
echo "=> Unpacking archive ..."
tar -xzf "/tmp/$gh_repo.tar.gz" -C "$temp_dir"
echo "=> Deleting old $gh_desc ..."
rm -rf ~/.icons/ePapirus
rm -rf ~/.icons/Papirus
rm -rf ~/.icons/Papirus-Adapta
rm -rf ~/.icons/Papirus-Adapta-Nokto
rm -rf ~/.icons/Papirus-Dark
rm -rf ~/.icons/Papirus-Light
echo "=> Installing ..."
mkdir -p ~/.icons
cp -R \
"$temp_dir/$gh_repo-master/ePapirus" \
"$temp_dir/$gh_repo-master/Papirus" \
"$temp_dir/$gh_repo-master/Papirus-Adapta" \
"$temp_dir/$gh_repo-master/Papirus-Adapta-Nokto" \
"$temp_dir/$gh_repo-master/Papirus-Dark" \
"$temp_dir/$gh_repo-master/Papirus-Light" ~/.icons/
# Try to restore the color of folders from a config
if which papirus-folders > /dev/null 2>&1; then
papirus-folders -R || true
fi
gtk-update-icon-cache -q ~/.icons/ePapirus || true
gtk-update-icon-cache -q ~/.icons/Papirus || true
gtk-update-icon-cache -q ~/.icons/Papirus-Adapta || true
gtk-update-icon-cache -q ~/.icons/Papirus-Adapta-Nokto || true
gtk-update-icon-cache -q ~/.icons/Papirus-Dark || true
gtk-update-icon-cache -q ~/.icons/Papirus-Light || true
echo "=> Clearing cache ..."
rm -rf "/tmp/$gh_repo.tar.gz" "$temp_dir"
echo "=> Done!"