-
Notifications
You must be signed in to change notification settings - Fork 8
/
install.sh
executable file
·47 lines (38 loc) · 1.03 KB
/
install.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
#!/usr/bin/env bash
# Change working directory to project folder
cd "${0%/*}"
EXT_NAME="Airpod Battery Monitor"
EXT_UUID="[email protected]"
if ! command -v msgfmt &> /dev/null
then
echo "Missing gettext!!!"
echo "Please install gettext and re-run this installer."
echo "Press any key to exit..."
read -n1
exit 1
fi
echo "Packing extension..."
gnome-extensions pack ./ \
--extra-source=icons/ \
--extra-source=lib/ \
--extra-source=preferences/ \
--extra-source=ui/ \
--podir=po \
--force \
if [ $? -ne 0 ]; then
echo "Error occur during compilation of Gnome Extension ${EXT_NAME}."
echo "Press any key to exit..."
read -n1
exit $?
fi
echo "Installing extension..."
gnome-extensions install $EXT_UUID.shell-extension.zip --force
if [ $? -ne 0 ]; then
read -n1
exit $?
fi
echo "Gnome Extension $EXT_NAME was succesfully installed."
echo "Restart the shell (or logout) to be able to enable the extension."
echo "Press any key to exit..."
read -n1
exit 0