-
-
Notifications
You must be signed in to change notification settings - Fork 60
Expand file tree
/
Copy pathuninstall_dev.sh
More file actions
executable file
·36 lines (30 loc) · 925 Bytes
/
Copy pathuninstall_dev.sh
File metadata and controls
executable file
·36 lines (30 loc) · 925 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
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
set -e
PLUGIN_NAME="QGIS_FMV"
resolve_plugin_dir() {
local candidates=(
"$HOME/Library/Application Support/QGIS/QGIS4/profiles/default/python/plugins/$PLUGIN_NAME"
"${XDG_DATA_HOME:-$HOME/.local/share}/QGIS/QGIS4/profiles/default/python/plugins/$PLUGIN_NAME"
"$HOME/.local/share/QGIS/QGIS3/profiles/default/python/plugins/$PLUGIN_NAME"
)
local path
for path in "${candidates[@]}"; do
if [ -e "$path" ] || [ -L "$path" ]; then
echo "$path"
return 0
fi
done
return 1
}
if ! PLUGIN_DIR="$(resolve_plugin_dir)"; then
echo "Plugin not installed. Nothing to remove."
exit 0
fi
if [ -L "$PLUGIN_DIR" ]; then
rm "$PLUGIN_DIR"
echo "Symlink removed: $PLUGIN_DIR"
elif [ -d "$PLUGIN_DIR" ]; then
rm -rf "$PLUGIN_DIR"
echo "Plugin directory removed: $PLUGIN_DIR"
fi
echo "Plugin uninstalled successfully."