forked from noroadsleft000/gnome-network-stats
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommands.sh
87 lines (77 loc) · 1.77 KB
/
commands.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
#!/bin/bash
#set -e
#set -x
help()
{
echo "Command usage : "
echo "-------------------------------------------------------"
echo "./commands.sh build -- build the extension"
echo "./commands.sh install -- install the extension"
echo "./commands.sh enable -- enable the extension"
echo "./commands.sh disable -- disable the extension"
echo "./commands.sh pack -- package the extension"
echo "./commands.sh launch_debug -- launch nested session to debug the extension"
}
build()
{
#msgfmt *.po --output-file=*.mo
glib-compile-schemas schemas
}
install()
{
build
pack
gnome-extensions install --force network-stats@gnome.noroadsleft.xyz.shell-extension.zip
enable
}
uninstall()
{
disable
gnome-extensions uninstall network-stats@gnome.noroadsleft.xyz
}
enable()
{
gnome-extensions enable network-stats@gnome.noroadsleft.xyz
}
disable()
{
gnome-extensions disable network-stats@gnome.noroadsleft.xyz
}
pack()
{
gnome-extensions pack \
--force \
--extra-source=App.js \
--extra-source=AppController.js \
--extra-source=AppSettingsModel.js \
--extra-source=AUTHORS \
--extra-source=README.md \
--extra-source=LICENSE \
--extra-source=assets \
--extra-source=net \
--extra-source=ui \
--extra-source=utils \
--podir=locale
}
launch_debug()
{
install
dbus-run-session -- gnome-shell --nested --wayland
}
if [ "$1" = "build" ]; then
build
elif [ "$1" = "install" ]; then
install
elif [ "$1" = "uninstall" ]; then
uninstall
elif [ "$1" = "enable" ]; then
enable
elif [ "$1" = "enable" ]; then
disable
elif [ "$1" = "pack" ]; then
pack
elif [ "$1" = "launch_debug" ]; then
launch_debug
else
help
fi