-
-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathsetup_path.sh
More file actions
executable file
·64 lines (54 loc) · 1.83 KB
/
Copy pathsetup_path.sh
File metadata and controls
executable file
·64 lines (54 loc) · 1.83 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
#!/bin/bash
# JSHunter PATH Setup Script
# Run this script after installing JSHunter to automatically configure your PATH
echo "🔧 JSHunter PATH Setup Script"
echo "=============================="
# Determine shell profile
if [ -n "$ZSH_VERSION" ]; then
PROFILE="$HOME/.zshrc"
elif [ -n "$BASH_VERSION" ]; then
PROFILE="$HOME/.bashrc"
else
PROFILE="$HOME/.profile"
fi
echo "📁 Using profile: $PROFILE"
# Check if PATH export already exists
PATH_EXPORT='export PATH="$HOME/.local/bin:$PATH"'
if [ -f "$PROFILE" ] && grep -q "$PATH_EXPORT" "$PROFILE"; then
echo "✅ PATH already configured in $PROFILE"
else
echo "🔧 Adding JSHunter to PATH..."
echo "" >> "$PROFILE"
echo "# JSHunter PATH configuration" >> "$PROFILE"
echo "$PATH_EXPORT" >> "$PROFILE"
echo "✅ Added to $PROFILE"
fi
# Check if jshunter executable exists
JSHUNTER_PATH="$HOME/.local/bin/jshunter"
if [ -f "$JSHUNTER_PATH" ]; then
echo "✅ JSHunter executable found: $JSHUNTER_PATH"
# Make it executable
chmod +x "$JSHUNTER_PATH"
# Test the command
echo "🧪 Testing JSHunter..."
if "$JSHUNTER_PATH" --version >/dev/null 2>&1; then
echo "✅ JSHunter is working correctly!"
echo ""
echo "🚀 You can now use:"
echo " jshunter --help"
echo " jshunter --version"
else
echo "⚠️ JSHunter executable found but not working properly"
echo "💡 Try running: python3 -m jshunter --help"
fi
else
echo "❌ JSHunter executable not found in ~/.local/bin/"
echo "💡 Try running: python3 -m jshunter --help"
fi
echo ""
echo "📝 To apply changes, run:"
echo " source $PROFILE"
echo ""
echo "📚 Documentation: https://github.com/iamunixtz/JsHunter"
echo "🐍 PyPI Package: https://pypi.org/project/jshunter/"
echo "=============================="