forked from shimmerproject/libreoffice-style-elementary
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall-elementary-local.sh
executable file
·68 lines (60 loc) · 1.85 KB
/
install-elementary-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
#!/bin/sh
set -e
gh_repo="libreoffice-style-elementary"
gh_desc="Elementary LibreOffice icon themes"
cat <<- EOF
$gh_desc
https://github.com/rizmut/$gh_repo
EOF
temp_dir="$(mktemp -d)"
cd "elementary"
zip -r -D images_elementary.zip *
mv "images_elementary.zip" \
"./../build/"
cd "./../build/"
echo "=> Deleting old $gh_desc extension file ..."
rm -f "Elementary-IconSet.oxt"
echo "=> Create new $gh_desc extension one ..."
cp "images_elementary.zip" \
"Elementary-IconSet/iconsets"
cd "./Elementary-IconSet"
zip -r -D Elementary-IconSet.oxt *
mv "Elementary-IconSet.oxt" \
"./.."
cd "./../.."
cd "elementary_svg"
zip -r -D images_elementary_svg.zip *
mv "images_elementary_svg.zip" \
"./../build/"
cd "./../build/"
echo "=> Deleting old $gh_desc extension file ..."
rm -f "Elementary-SVG-IconSet.oxt"
echo "=> Create new $gh_desc extension one ..."
cp "images_elementary_svg.zip" \
"Elementary-SVG-IconSet/iconsets/"
cd "./Elementary-SVG-IconSet"
zip -r -D Elementary-SVG-IconSet.oxt *
mv "Elementary-SVG-IconSet.oxt" \
"./.."
cd "./../.."
echo "=> Deleting old $gh_desc ..."
sudo rm -f "/usr/share/libreoffice/share/config/images_elementary.zip"
sudo rm -f "/usr/share/libreoffice/share/config/images_elementary_svg.zip"
echo "=> Installing ..."
sudo mkdir -p "/usr/share/libreoffice/share/config"
sudo cp \
"build/images_elementary.zip" \
"/usr/share/libreoffice/share/config"
sudo cp \
"build/images_elementary_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_elementary.zip" "$dir"
sudo ln -sf "/usr/share/libreoffice/share/config/images_elementary_svg.zip" "$dir"
done
echo "=> Done!"