-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·82 lines (70 loc) · 2.75 KB
/
install.sh
File metadata and controls
executable file
·82 lines (70 loc) · 2.75 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
#!/bin/bash
# Bazzounquester Installation Script
# Author: Hassan Bazzoun <hassan.bazzoundev@gmail.com>
set -e
echo ""
echo "╔═══════════════════════════════════════════════════════════════╗"
echo "║ Bazzounquester - Installation Script ║"
echo "╚═══════════════════════════════════════════════════════════════╝"
echo ""
# Check if Rust is installed
if ! command -v cargo &> /dev/null; then
echo "Error: Rust is not installed."
echo ""
echo "Please install Rust from: https://rustup.rs/"
echo ""
echo "Run this command to install Rust:"
echo " curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh"
echo ""
exit 1
fi
echo "✓ Rust is installed"
echo ""
# Build and install
echo "Building and installing bazzounquester..."
echo ""
cargo install --path .
echo ""
echo "✓ Installation complete!"
echo ""
# Check if ~/.cargo/bin is in PATH
CARGO_BIN="$HOME/.cargo/bin"
if [[ ":$PATH:" == *":$CARGO_BIN:"* ]]; then
echo "✓ $CARGO_BIN is already in your PATH"
echo ""
echo "You can now run: bazzounquester"
echo ""
else
echo "⚠ $CARGO_BIN is NOT in your PATH"
echo ""
echo "To use bazzounquester from anywhere, add this line to your shell config:"
echo ""
# Detect shell
if [ -n "$BASH_VERSION" ]; then
SHELL_CONFIG="~/.bashrc"
elif [ -n "$ZSH_VERSION" ]; then
SHELL_CONFIG="~/.zshrc"
else
SHELL_CONFIG="~/.profile"
fi
echo " export PATH=\"\$HOME/.cargo/bin:\$PATH\""
echo ""
echo "Add it to your $SHELL_CONFIG file:"
echo " echo 'export PATH=\"\$HOME/.cargo/bin:\$PATH\"' >> $SHELL_CONFIG"
echo " source $SHELL_CONFIG"
echo ""
echo "Or run it directly from:"
echo " $CARGO_BIN/bazzounquester"
echo ""
fi
echo "╔═══════════════════════════════════════════════════════════════╗"
echo "║ Installation Complete! ║"
echo "╚═══════════════════════════════════════════════════════════════╝"
echo ""
echo "Try it out:"
echo " bazzounquester # Start interactive mode"
echo " bazzounquester --help # Show help"
echo " bazzounquester --version # Show version"
echo ""
echo "For more information, see README.md"
echo ""