-
Notifications
You must be signed in to change notification settings - Fork 4
/
install-sifr-local.sh
executable file
·117 lines (109 loc) · 3.3 KB
/
install-sifr-local.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
#!/bin/sh
set -e
gh_repo="libreoffice-style-sifr"
gh_desc="Sifr LibreOffice icon themes"
cat <<- EOF
$gh_desc
https://github.com/rizmut/$gh_repo
EOF
temp_dir="$(mktemp -d)"
# Sifr
cd "sifr"
cp "links.txt" \
"../sifr_dark"
zip -r -D images_sifr.zip *
mv "images_sifr.zip" \
"./../build/"
cd "./../build/"
echo "=> Deleting old $gh_desc extension file ..."
rm -f "Sifr-IconSet.oxt"
echo "=> Create new $gh_desc extension one ..."
cp "images_sifr.zip" \
"Sifr-IconSet/iconsets"
cd "./Sifr-IconSet"
zip -r -D Sifr-IconSet.oxt *
mv "Sifr-IconSet.oxt" \
"./.."
cd "./../.."
# Sifr Dark
echo "=> Deleting old $gh_desc extension file (dark) ..."
cd "sifr_dark"
zip -r -D images_sifr_dark.zip *
mv "images_sifr_dark.zip" \
"./../build/"
cd "./../build/"
echo "=> Deleting old $gh_desc extension file (dark) ..."
rm -f "Sifr-Dark-IconSet.oxt"
echo "=> Create new $gh_desc extension one (dark) ..."
cp "images_sifr_dark.zip" \
"Sifr-Dark-IconSet/iconsets"
cd "./Sifr-Dark-IconSet"
zip -r -D Sifr-Dark-IconSet.oxt *
mv "Sifr-Dark-IconSet.oxt" \
"./.."
cd "./../.."
#Sifr SVG
echo "=> Deleting old $gh_desc extension file (SVG) ..."
cd "sifr_svg"
zip -r -D images_sifr_svg.zip *
mv "images_sifr_svg.zip" \
"./../build/"
cd "./../build/"
echo "=> Deleting old $gh_desc extension file (SVG) ..."
rm -f "Sifr-SVG-IconSet.oxt"
echo "=> Create new $gh_desc extension one (SVG) ..."
cp "images_sifr_svg.zip" \
"Sifr-SVG-IconSet/iconsets"
cd "./Sifr-SVG-IconSet"
zip -r -D Sifr-SVG-IconSet.oxt *
mv "Sifr-SVG-IconSet.oxt" \
"./.."
cd "./../.."
#Sifr Dark SVG
echo "=> Deleting old $gh_desc extension file (Dark SVG) ..."
cd "sifr_dark_svg"
zip -r -D images_sifr_dark_svg.zip *
mv "images_sifr_dark_svg.zip" \
"./../build/"
cd "./../build/"
echo "=> Deleting old $gh_desc extension file (Dark SVG) ..."
rm -f "Sifr-Dark-SVG-IconSet.oxt"
echo "=> Create new $gh_desc extension one (Dark SVG) ..."
cp "images_sifr_dark_svg.zip" \
"Sifr-Dark-SVG-IconSet/iconsets"
cd "./Sifr-Dark-SVG-IconSet"
zip -r -D Sifr-Dark-SVG-IconSet.oxt *
mv "Sifr-Dark-SVG-IconSet.oxt" \
"./.."
cd "./../.."
echo "=> Deleting whole old $gh_desc ..."
sudo rm -f "/usr/share/libreoffice/share/config/images_sifr.zip"
sudo rm -f "/usr/share/libreoffice/share/config/images_sifr_dark.zip"
sudo rm -f "/usr/share/libreoffice/share/config/images_sifr_svg.zip"
sudo rm -f "/usr/share/libreoffice/share/config/images_sifr_dark_svg.zip"
echo "=> Installing ..."
sudo mkdir -p "/usr/share/libreoffice/share/config"
sudo cp \
"build/images_sifr.zip" \
"/usr/share/libreoffice/share/config"
sudo cp \
"build/images_sifr_dark.zip" \
"/usr/share/libreoffice/share/config"
sudo cp \
"build/images_sifr_svg.zip" \
"/usr/share/libreoffice/share/config"
sudo cp \
"build/images_sifr_dark_svg.zip" \
"/usr/share/libreoffice/share/config"
for dir in \
/usr/lib64/libreoffice/share/config \
/usr/lib/libreoffice/share/config \
/usr/local/lib/libreoffice/share/config \
/opt/libreoffice*/share/config; do
[ -d "$dir" ] || continue
sudo ln -sf "/usr/share/libreoffice/share/config/images_sifr.zip" "$dir"
sudo ln -sf "/usr/share/libreoffice/share/config/images_sifr_dark.zip" "$dir"
sudo ln -sf "/usr/share/libreoffice/share/config/images_sifr_svg.zip" "$dir"
sudo ln -sf "/usr/share/libreoffice/share/config/images_sifr_dark_svg.zip" "$dir"
done
echo "=> Done!"