-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
Β·51 lines (42 loc) Β· 1.32 KB
/
install.sh
File metadata and controls
executable file
Β·51 lines (42 loc) Β· 1.32 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
#!/bin/bash
# Installation script for DocWeave
set -e
echo "π Installing DocWeave..."
# Check if Poetry is installed
if ! command -v poetry &> /dev/null; then
echo "β Poetry is not installed. Installing..."
curl -sSL https://install.python-poetry.org | python3 -
export PATH="$HOME/.local/bin:$PATH"
fi
# Navigate to DocWeave directory
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$SCRIPT_DIR"
# Install dependencies
echo "π¦ Installing dependencies..."
poetry install
# Build package
echo "π¨ Building package..."
poetry build
# Install globally
echo "π₯ Installing globally..."
pip install --user dist/docweave-*.whl
# Add to PATH
BIN_PATH="$HOME/.local/bin"
if [[ ":$PATH:" != *":$BIN_PATH:"* ]]; then
echo "π Adding to PATH..."
if [[ "$SHELL" == *"zsh"* ]]; then
echo "export PATH=\"$BIN_PATH:\$PATH\"" >> ~/.zshrc
echo "β
Added to ~/.zshrc. Run: source ~/.zshrc"
elif [[ "$SHELL" == *"bash"* ]]; then
echo "export PATH=\"$BIN_PATH:\$PATH\"" >> ~/.bashrc
echo "β
Added to ~/.bashrc. Run: source ~/.bashrc"
fi
fi
echo ""
echo "β
DocWeave installed successfully!"
echo ""
echo "To use DocWeave:"
echo " 1. Reload your shell: source ~/.zshrc (or ~/.bashrc)"
echo " 2. Navigate to any git repository"
echo " 3. Run: docweave analyze"
echo ""