-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathuninstall-linux.sh
More file actions
executable file
·54 lines (44 loc) · 1.25 KB
/
Copy pathuninstall-linux.sh
File metadata and controls
executable file
·54 lines (44 loc) · 1.25 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
51
52
53
54
#!/bin/bash
# Inkscape Symbols Libraries Uninstaller (Linux)
echo "============================================"
echo " Inkscape Symbols Libraries Uninstaller"
echo "============================================"
echo ""
INKSCAPE_DIR="$HOME/.config/inkscape/symbols"
if [ ! -d "$INKSCAPE_DIR" ]; then
echo "Inkscape symbols directory not found."
echo "Nothing to uninstall."
exit 0
fi
echo "This will remove symbol libraries from:"
echo "$INKSCAPE_DIR"
echo ""
read -p "Are you sure? (y/N): " confirm
if [ "$confirm" != "y" ] && [ "$confirm" != "Y" ]; then
echo "Cancelled."
exit 0
fi
echo ""
echo "Removing symbol libraries..."
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REMOVED=0
for file in "$SCRIPT_DIR"/*.svg; do
if [ -f "$file" ]; then
filename=$(basename "$file")
target="$INKSCAPE_DIR/$filename"
if [ -f "$target" ]; then
rm "$target"
if [ $? -eq 0 ]; then
echo "Removed: $filename"
((REMOVED++))
fi
fi
fi
done
echo ""
echo "============================================"
echo "Removed $REMOVED symbol libraries."
echo "============================================"
echo ""
echo "Please restart Inkscape."
echo ""