-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
executable file
·54 lines (44 loc) · 1.15 KB
/
setup.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
#!/bin/bash
EXTENSION_DIR="$HOME/.local/share/gnome-shell/extensions/[email protected]"
function install_extension() {
if [ ! -d "$EXTENSION_DIR" ]; then
mkdir -p "$EXTENSION_DIR"
fi
cp ./metadata.json "$EXTENSION_DIR/metadata.json"
cp ./stylesheet.css "$EXTENSION_DIR/stylesheet.css"
cp ./extension.js "$EXTENSION_DIR/extension.js"
cp ./prefs.js "$EXTENSION_DIR/prefs.js"
cp -r schemas "$EXTENSION_DIR/schemas"
gnome-extensions enable [email protected]
echo "Restart GNOME Shell (Alt+F2, luego 'r' y Enter)"
echo "Install complete"
}
function uninstall_extension() {
gnome-extensions disable [email protected]
rm -rf "$EXTENSION_DIR"
echo "Extension uninstalled"
}
function reinstall_extension() {
uninstall_extension
install_extension
}
# Menu
echo "Make a choice:"
echo "1) Install"
echo "2) Reinstall"
echo "3) Uninstall"
read -p "Choice: " option
case $option in
1)
install_extension
;;
2)
reinstall_extension
;;
3)
uninstall_extension
;;
*)
echo "Invalid option."
;;
esac