-
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathheadsetcontrol.sh
More file actions
executable file
·50 lines (47 loc) · 1.35 KB
/
headsetcontrol.sh
File metadata and controls
executable file
·50 lines (47 loc) · 1.35 KB
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
#!/bin/bash
# Script to pack, install, or upload the HeadsetControl GNOME Shell extension
extension="HeadsetControl@lauinger-clan.de"
extensionfile=$extension".shell-extension.zip"
echo "Running $0 for $extension with arguments: $@"
#cleanup old zip if exists
if [ -f $extensionfile ]; then
rm $extensionfile
fi
case "$1" in
zip|pack)
cd $extension
gnome-extensions pack --podir=../po/ --out-dir=../ --extra-source=./ui/ --extra-source=../LICENSE --force
cd ..
echo "Extension zip created ..."
;;
install)
if [ ! -f $extensionfile ]; then
$0 zip
fi
gnome-extensions install $extensionfile --force
gnome-extensions enable $extension
echo "Extension zip installed ..."
;;
upload)
if [ ! -f $extensionfile ]; then
$0 zip
fi
gnome-extensions upload --user ChrisLauinger77 --password-file /var/data/dev/ego_password $extensionfile
;;
translate)
reffile=HeadsetControl.pot
xgettext --from-code=UTF-8 --output=po/"$reffile" $extension/*.js $extension/schemas/*.xml $extension/ui/*.ui
cd po
for pofile in *.po
do
echo "Updating: $pofile"
msgmerge --backup=off -N -U "$pofile" "$reffile"
msgattrib --no-obsolete -o "$pofile" "$pofile"
done
echo "Done."
;;
*)
echo "Usage: $0 {zip|pack|install|translate|upload}"
exit 1
;;
esac