Repository navigation
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·69 lines (57 loc) · 1.82 KB
/
Copy pathinstall.sh
File metadata and controls
executable file
·69 lines (57 loc) · 1.82 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
#!/bin/bash
# Micracode Installer Script
# Usage: curl -sSL https://raw.githubusercontent.com/Jamessdevops/micracode/main/install.sh | bash
set -e
REPO_URL="https://github.com/Jamessdevops/micracode.git"
INSTALL_DIR="$HOME/.micracode"
echo "🚀 Installing Micracode..."
# Check for Python 3.13+
if ! command -v python3 &> /dev/null; then
echo "❌ Python 3 is required but not installed."
exit 1
fi
PYTHON_VERSION=$(python3 -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")')
REQUIRED_VERSION="3.13"
if [ "$(printf '%s\n' "$REQUIRED_VERSION" "$PYTHON_VERSION" | sort -V | head -n1)" != "$REQUIRED_VERSION" ]; then
echo "❌ Python $REQUIRED_VERSION or higher is required. You have Python $PYTHON_VERSION"
exit 1
fi
# Check for pip
if ! command -v pip3 &> /dev/null; then
echo "❌ pip3 is required but not installed."
exit 1
fi
# Check for git
if ! command -v git &> /dev/null; then
echo "❌ git is required but not installed."
exit 1
fi
# Clone or update the repository
if [ -d "$INSTALL_DIR" ]; then
echo "📦 Updating existing installation..."
cd "$INSTALL_DIR"
git pull --quiet
else
echo "📦 Cloning repository..."
git clone --quiet "$REPO_URL" "$INSTALL_DIR"
cd "$INSTALL_DIR"
fi
# Install the package
echo "📥 Installing dependencies..."
pip3 install --quiet --user .
# Verify installation
if command -v micracode &> /dev/null; then
echo ""
echo "✅ Micracode installed successfully!"
echo ""
echo "Run 'micracode' to start the application."
else
# Add ~/.local/bin to PATH hint
echo ""
echo "✅ Installation complete!"
echo ""
echo "⚠️ You may need to add ~/.local/bin to your PATH:"
echo " export PATH=\"\$HOME/.local/bin:\$PATH\""
echo ""
echo "Then run 'micracode' to start the application."
fi