-
Notifications
You must be signed in to change notification settings - Fork 1
/
install-sukapura-local.sh
executable file
·118 lines (106 loc) · 3.35 KB
/
install-sukapura-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-sukapura"
gh_desc="sukapura LibreOffice icon themes"
cat <<- EOF
$gh_desc
https://github.com/rizmut/$gh_repo
EOF
temp_dir="$(mktemp -d)"
# Sukapura
cd "sukapura"
cp "links.txt" \
"../sukapura_dark"
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 "./../.."
# Sukapura Dark
cd "sukapura_dark"
zip -r -D images_sukapura_dark.zip *
mv "images_sukapura_dark.zip" \
"./../build/"
cd "./../build/"
echo "=> Deleting old $gh_desc extension file (dark) ..."
rm -f "Sukapura-Dark-IconSet.oxt"
echo "=> Create new $gh_desc extension one (dark) ..."
cp "images_sukapura_dark.zip" \
"Sukapura-Dark-IconSet/iconsets"
cd "./Sukapura-Dark-IconSet"
zip -r -D Sukapura-Dark-IconSet.oxt *
mv "Sukapura-Dark-IconSet.oxt" \
"./.."
cd "./../.."
# sukapura SVG
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 (SVG) ..."
rm -f "Sukapura-SVG-IconSet.oxt"
echo "=> Create new $gh_desc extension one (SVG) ..."
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 "./../.."
# sukapura Dark SVG
cd "sukapura_dark_svg"
zip -r -D images_sukapura_dark_svg.zip *
mv "images_sukapura_dark_svg.zip" \
"./../build/"
cd "./../build/"
echo "=> Deleting old $gh_desc extension file (dark SVG) ..."
rm -f "Sukapura-Dark-SVG-IconSet.oxt"
echo "=> Create new $gh_desc extension one (dark SVG) ..."
cp "images_sukapura_dark_svg.zip" \
"Sukapura-Dark-SVG-IconSet/iconsets"
cd "./Sukapura-Dark-SVG-IconSet"
zip -r -D Sukapura-Dark-SVG-IconSet.oxt *
mv "Sukapura-Dark-SVG-IconSet.oxt" \
"./.."
cd "./../.."
echo "=> Deleting whole old $gh_desc ..."
sudo rm -f "/usr/share/libreoffice/share/config/images_sukapura.zip"
sudo rm -f "/usr/share/libreoffice/share/config/images_sukapura_dark.zip"
sudo rm -f "/usr/share/libreoffice/share/config/images_sukapura_svg.zip"
sudo rm -f "/usr/share/libreoffice/share/config/images_sukapura_dark_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_dark.zip" \
"/usr/share/libreoffice/share/config"
sudo cp \
"build/images_sukapura_svg.zip" \
"/usr/share/libreoffice/share/config"
sudo cp \
"build/images_sukapura_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_sukapura.zip" "$dir"
sudo ln -sf "/usr/share/libreoffice/share/config/images_sukapura_dark.zip" "$dir"
sudo ln -sf "/usr/share/libreoffice/share/config/images_sukapura_svg.zip" "$dir"
sudo ln -sf "/usr/share/libreoffice/share/config/images_sukapura_dark_svg.zip" "$dir"
done
echo "=> Done!"