-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathuninstall.sh
More file actions
executable file
·26 lines (22 loc) · 845 Bytes
/
Copy pathuninstall.sh
File metadata and controls
executable file
·26 lines (22 loc) · 845 Bytes
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
#!/bin/bash
set -e
# --- Configuration ---
# Read the UUID directly from metadata.json
# The '-r' flag removes the quotes from the output string.
EXTENSION_UUID=$(jq -r '.uuid' gnome-extensions/extension/metadata.json)
# Check if jq succeeded and EXTENSION_UUID is set
if [ -z "$EXTENSION_UUID" ]; then
echo "Error: Could not parse UUID from metadata.json. Is 'jq' installed?"
exit 1
fi
# Define uninstallation directory
INSTALL_DIR="$HOME/.local/share/gnome-shell/extensions/$EXTENSION_UUID"
# --- Main Script ---
if [ -d "$INSTALL_DIR" ]; then
echo "Uninstalling extension from: $INSTALL_DIR"
rm -rf "$INSTALL_DIR"
echo "Extension uninstalled successfully."
echo "You may need to restart GNOME Shell (Alt+F2, type 'r', press Enter) or log out."
else
echo "Extension not found at $INSTALL_DIR. Nothing to do."
fi