-
Notifications
You must be signed in to change notification settings - Fork 1
/
install-sukapura-local-old.sh
executable file
·69 lines (60 loc) · 1.8 KB
/
install-sukapura-local-old.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="libreoffice-style-sukapura"
gh_desc="sukapura LibreOffice icon themes"
cat <<- EOF
$gh_desc
https://github.com/rizmut/$gh_repo
EOF
temp_dir="$(mktemp -d)"
cd "sukapura"
zip -r -D images_sukapura.zip *
mv "images_sukapura.zip" \
"./../build/"
cd "./../build/"
echo "=> Deleting old $gh_desc extension file ..."
rm -f "Sukapura-IconSet.oxt"
echo "=> Create new $gh_desc extension one ..."
cp "images_sukapura.zip" \
"Sukapura-IconSet/iconsets/"
cd "./Sukapura-IconSet"
zip -r -D Sukapura-IconSet.oxt *
mv "Sukapura-IconSet.oxt" \
"./.."
cd "./../.."
cd "sukapura_svg"
zip -r -D images_sukapura_svg.zip *
mv "images_sukapura_svg.zip" \
"./../build/"
cd "./../build/"
echo "=> Deleting old $gh_desc extension file ..."
rm -f "Sukapura-SVG-IconSet.oxt"
echo "=> Create new $gh_desc extension one ..."
cp "images_sukapura_svg.zip" \
"Sukapura-SVG-IconSet/iconsets/"
cd "./Sukapura-SVG-IconSet"
zip -r -D Sukapura-SVG-IconSet.oxt *
mv "Sukapura-SVG-IconSet.oxt" \
"./.."
cd "./../.."
echo "=> Deleting old $gh_desc ..."
sudo rm -f "/usr/share/libreoffice/share/config/images_sukapura.zip"
sudo rm -f "/usr/share/libreoffice/share/config/images_sukapura_svg.zip"
echo "=> Installing ..."
sudo mkdir -p "/usr/share/libreoffice/share/config"
sudo cp \
"build/images_sukapura.zip" \
"/usr/share/libreoffice/share/config"
sudo cp \
"build/images_sukapura_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_sukapura.zip" "$dir"
sudo ln -sf "/usr/share/libreoffice/share/config/images_sukapura_svg.zip" "$dir"
done
echo "=> Done!"