-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall-colibre-local.sh
executable file
·118 lines (106 loc) · 3.29 KB
/
install-colibre-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
118
#!/bin/sh
set -e
gh_repo="libreoffice-style-colibre"
gh_desc="colibre LibreOffice icon themes"
cat <<- EOF
$gh_desc
https://github.com/rizmut/$gh_repo
EOF
temp_dir="$(mktemp -d)"
# Colibre
cd "colibre"
cp "links.txt" \
"../colibre_dark"
zip -r -D images_colibre.zip *
mv "images_colibre.zip" \
"./../build/"
cd "./../build/"
echo "=> Deleting old $gh_desc extension file ..."
rm -f "Colibre-IconSet.oxt"
echo "=> Create new $gh_desc extension one ..."
cp "images_colibre.zip" \
"Colibre-IconSet/iconsets"
cd "./Colibre-IconSet"
zip -r -D Colibre-IconSet.oxt *
mv "Colibre-IconSet.oxt" \
"./.."
cd "./../.."
# Colibre Dark
cd "colibre_dark"
zip -r -D images_colibre_dark.zip *
mv "images_colibre_dark.zip" \
"./../build/"
cd "./../build/"
echo "=> Deleting old $gh_desc extension file (dark) ..."
rm -f "Colibre-Dark-IconSet.oxt"
echo "=> Create new $gh_desc extension one (dark) ..."
cp "images_colibre_dark.zip" \
"Colibre-Dark-IconSet/iconsets"
cd "./Colibre-Dark-IconSet"
zip -r -D Colibre-Dark-IconSet.oxt *
mv "Colibre-Dark-IconSet.oxt" \
"./.."
cd "./../.."
# colibre SVG
cd "colibre_svg"
zip -r -D images_colibre_svg.zip *
mv "images_colibre_svg.zip" \
"./../build/"
cd "./../build/"
echo "=> Deleting old $gh_desc extension file (SVG) ..."
rm -f "Colibre-SVG-IconSet.oxt"
echo "=> Create new $gh_desc extension one (SVG) ..."
cp "images_colibre_svg.zip" \
"Colibre-SVG-IconSet/iconsets"
cd "./Colibre-SVG-IconSet"
zip -r -D Colibre-SVG-IconSet.oxt *
mv "Colibre-SVG-IconSet.oxt" \
"./.."
cd "./../.."
# colibre Dark SVG
cd "colibre_dark_svg"
zip -r -D images_colibre_dark_svg.zip *
mv "images_colibre_dark_svg.zip" \
"./../build/"
cd "./../build/"
echo "=> Deleting old $gh_desc extension file (dark SVG) ..."
rm -f "Colibre-Dark-SVG-IconSet.oxt"
echo "=> Create new $gh_desc extension one (dark SVG) ..."
cp "images_colibre_dark_svg.zip" \
"Colibre-Dark-SVG-IconSet/iconsets"
cd "./Colibre-Dark-SVG-IconSet"
zip -r -D Colibre-Dark-SVG-IconSet.oxt *
mv "Colibre-Dark-SVG-IconSet.oxt" \
"./.."
cd "./../.."
echo "=> Deleting whole old $gh_desc ..."
sudo rm -f "/usr/share/libreoffice/share/config/images_colibre.zip"
sudo rm -f "/usr/share/libreoffice/share/config/images_colibre_dark.zip"
sudo rm -f "/usr/share/libreoffice/share/config/images_colibre_svg.zip"
sudo rm -f "/usr/share/libreoffice/share/config/images_colibre_dark_svg.zip"
echo "=> Installing ..."
sudo mkdir -p "/usr/share/libreoffice/share/config"
sudo cp \
"build/images_colibre.zip" \
"/usr/share/libreoffice/share/config"
sudo cp \
"build/images_colibre_dark.zip" \
"/usr/share/libreoffice/share/config"
sudo cp \
"build/images_colibre_svg.zip" \
"/usr/share/libreoffice/share/config"
sudo cp \
"build/images_colibre_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_colibre.zip" "$dir"
sudo ln -sf "/usr/share/libreoffice/share/config/images_colibre_dark.zip" "$dir"
sudo ln -sf "/usr/share/libreoffice/share/config/images_colibre_svg.zip" "$dir"
sudo ln -sf "/usr/share/libreoffice/share/config/images_colibre_dark_svg.zip" "$dir"
done
echo "=> Done!"