-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathuninstall_test.sh
More file actions
executable file
·102 lines (90 loc) · 3.17 KB
/
uninstall_test.sh
File metadata and controls
executable file
·102 lines (90 loc) · 3.17 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
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#!/bin/bash
echo "=== KiCad LCSC Manager Plugin - Uninstall Script ==="
echo ""
# Detect KiCad version
KICAD_VERSIONS=("9.0" "8.0" "7.0" "6.0")
PLUGIN_DIR=""
for version in "${KICAD_VERSIONS[@]}"; do
DIR="$HOME/Documents/KiCad/$version/scripting/plugins"
if [ -d "$DIR/lcsc_manager" ]; then
PLUGIN_DIR="$DIR"
echo "Found LCSC Manager plugin for KiCad $version at: $PLUGIN_DIR"
break
fi
done
if [ -z "$PLUGIN_DIR" ]; then
echo "LCSC Manager plugin not found in any KiCad version"
echo "Checked locations:"
for version in "${KICAD_VERSIONS[@]}"; do
echo " - ~/Documents/KiCad/$version/scripting/plugins/lcsc_manager"
done
exit 0
fi
# Confirm uninstall
echo ""
echo "This will remove the LCSC Manager plugin from:"
echo " $PLUGIN_DIR/lcsc_manager"
echo ""
read -p "Continue? (y/N) " -n 1 -r
echo ""
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
echo "Uninstall cancelled."
exit 0
fi
# Remove plugin
echo ""
echo "Removing plugin..."
TARGET_DIR="$PLUGIN_DIR/lcsc_manager"
if [ -d "$TARGET_DIR" ]; then
rm -rf "$TARGET_DIR"
echo "✓ Plugin removed from: $TARGET_DIR"
else
echo "Plugin directory not found: $TARGET_DIR"
fi
# Python dependencies info
echo ""
echo "════════════════════════════════════════════════════════════════"
echo "⚠️ WARNING: Python Dependencies"
echo "════════════════════════════════════════════════════════════════"
echo ""
echo "The following Python packages were installed for this plugin:"
echo " - requests (used by many apps for HTTP requests)"
echo " - pydantic (used for data validation)"
echo " - Pillow (common image processing library)"
echo " - cairosvg (SVG conversion library)"
echo ""
echo "These packages may be used by:"
echo " - Other KiCad plugins"
echo " - Other Python applications on your system"
echo " - Development tools"
echo ""
echo "⚠️ DO NOT REMOVE unless you're certain they're not needed!"
echo ""
echo "If you want to remove them manually later, you can use:"
echo " pip3 list --user # To see installed packages"
echo " pip3 uninstall <package-name> # To remove specific packages"
echo ""
echo "════════════════════════════════════════════════════════════════"
echo ""
echo "We recommend KEEPING the Python packages installed."
echo ""
# Clean up config and logs (optional)
echo ""
echo "Configuration and logs are stored in:"
echo " ~/.kicad/lcsc_manager/"
echo ""
read -p "Remove configuration and logs? (y/N) " -n 1 -r
echo ""
if [[ $REPLY =~ ^[Yy]$ ]]; then
if [ -d "$HOME/.kicad/lcsc_manager" ]; then
rm -rf "$HOME/.kicad/lcsc_manager"
echo "✓ Configuration and logs removed"
else
echo "Configuration directory not found"
fi
fi
echo ""
echo "=== Uninstall Complete! ==="
echo ""
echo "The plugin has been removed. Restart KiCad to complete the uninstall."
echo ""