-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathuninstall.sh
More file actions
executable file
·42 lines (36 loc) · 992 Bytes
/
uninstall.sh
File metadata and controls
executable file
·42 lines (36 loc) · 992 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
37
38
39
40
41
42
#!/usr/bin/env bash
set -euo pipefail
readonly BINARY="samoyed"
readonly INSTALL_LOCATIONS=(
"$HOME/.local/bin/$BINARY"
"$HOME/bin/$BINARY"
"/usr/local/bin/$BINARY"
)
echo "Uninstalling Samoyed..."
echo ""
found=false
# Check common installation locations
for location in "${INSTALL_LOCATIONS[@]}"; do
if [ -f "$location" ]; then
echo "Found: $location"
rm -f "$location" && echo " Removed ✓" || echo " Failed to remove"
found=true
fi
done
if ! $found; then
echo "Samoyed binary not found in common locations"
echo ""
echo "Checked:"
printf ' %s\n' "${INSTALL_LOCATIONS[@]}"
echo ""
echo "If installed elsewhere, remove manually:"
echo " which samoyed"
echo " rm \$(which samoyed)"
fi
echo ""
echo "Note: Samoyed configuration remains in your repositories (.samoyed/ directories)"
echo "To fully remove:"
echo " cd your-repo"
echo " rm -rf .samoyed"
echo " git config --unset core.hooksPath"
echo ""