-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
executable file
·36 lines (29 loc) · 1.18 KB
/
build.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
#!/bin/bash
set -e
echo "Compiling Schemes..."
glib-compile-schemas schemas/
echo "Packing extension..."
gnome-extensions pack \
-f \
--podir=po \
--extra-source=fileUtils.js \
--extra-source=org.gnome.Mutter.DisplayConfig.xml \
--extra-source=indicators.js \
--extra-source=menuToggles.js
echo "Packing Done!"
while getopts 'ip' flag; do
case $flag in
i) gnome-extensions install -f quick-settings-resolution-and-refresh-rate@rukins.github.io.shell-extension.zip && \
echo "Extension installed! Now restart the GNOME Shell to apply the changes." || \
{ echo "ERROR: Could not install the extension!"; exit 1; };;
p) xgettext --from-code=UTF-8 \
--output=po/quick-settings-resolution-and-refresh-rate@rukins.github.io.pot *.js && \
echo "Pot file created!" || \
{ echo "ERROR: Could not create the pot file!"; exit 1; };;
*) echo "ERROR: Invalid flag!"
echo "Use '-i' to install the extension on your system."
echo "Use '-p' to create the pot file."
echo "Or run the script without any flags to just build it."
exit 1;;
esac
done