-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-install-cleanup.sh
More file actions
executable file
·60 lines (51 loc) · 1.54 KB
/
test-install-cleanup.sh
File metadata and controls
executable file
·60 lines (51 loc) · 1.54 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
#!/bin/bash
# Cleanup script for testing install.sh
# This script removes ee installations from common locations
set -e
echo "🧹 Cleaning up previous ee installations..."
# Common install locations
INSTALL_LOCATIONS=(
"/usr/local/bin/ee"
"$HOME/.local/bin/ee"
"$HOME/bin/ee"
"/tmp/ee-install-*"
)
# Remove ee from install locations
for location in "${INSTALL_LOCATIONS[@]}"; do
if [[ "$location" == *"*"* ]]; then
# Handle wildcards with find
find /tmp -name "ee-install-*" -type d 2>/dev/null | while read -r dir; do
if [[ -d "$dir" ]]; then
echo " Removing directory: $dir"
rm -rf "$dir"
fi
done
elif [[ -f "$location" ]]; then
echo " Removing: $location"
rm -f "$location"
fi
done
# Remove from PATH if it was added (check common shell configs)
SHELL_CONFIGS=(
"$HOME/.bashrc"
"$HOME/.zshrc"
"$HOME/.profile"
"$HOME/.bash_profile"
)
for config in "${SHELL_CONFIGS[@]}"; do
if [[ -f "$config" ]] && grep -q "\.local/bin.*ee" "$config" 2>/dev/null; then
echo " Found ee PATH reference in $config"
echo " Please manually remove any ee-related PATH exports from $config"
fi
done
# Clear any cached command locations
hash -r 2>/dev/null || true
echo "✅ Cleanup completed!"
echo ""
echo "Verification:"
if command -v ee >/dev/null 2>&1; then
echo "❌ ee is still available in PATH: $(which ee)"
echo " Manual removal may be needed"
else
echo "✅ ee is no longer available in PATH"
fi