-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·60 lines (50 loc) · 1.51 KB
/
Copy pathinstall.sh
File metadata and controls
executable file
·60 lines (50 loc) · 1.51 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
#!/usr/bin/env bash
# Graphify Toolkit installer
# Installs core scripts and orchestration tools to PATH
set -uo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
INSTALL_DIR="${GRAPHIFY_INSTALL_DIR:-$HOME/.local/bin}"
echo "Graphify Toolkit — Installer"
echo ""
# Check dependencies
MISSING=""
command -v jq >/dev/null 2>&1 || MISSING="${MISSING} jq"
command -v python3 >/dev/null 2>&1 || MISSING="${MISSING} python3"
if [[ -n "$MISSING" ]]; then
echo "Missing dependencies:$MISSING"
echo ""
echo "Install with:"
echo " Ubuntu/Debian: sudo apt install$MISSING"
echo " macOS: brew install$MISSING"
echo ""
exit 1
fi
# Create install directory
mkdir -p "$INSTALL_DIR"
# Install core scripts
echo "Installing core scripts to $INSTALL_DIR..."
for script in "$SCRIPT_DIR"/core/*.sh; do
[[ -f "$script" ]] || continue
name=$(basename "$script")
cp "$script" "$INSTALL_DIR/$name"
chmod +x "$INSTALL_DIR/$name"
echo " $name"
done
# Install bin scripts
echo "Installing orchestration tools..."
for script in "$SCRIPT_DIR"/bin/*.sh; do
[[ -f "$script" ]] || continue
name=$(basename "$script")
cp "$script" "$INSTALL_DIR/$name"
chmod +x "$INSTALL_DIR/$name"
echo " $name"
done
echo ""
# Check PATH
if ! echo "$PATH" | grep -q "$INSTALL_DIR"; then
echo "NOTE: $INSTALL_DIR is not in your PATH."
echo "Add it with:"
echo " echo 'export PATH=\"$INSTALL_DIR:\$PATH\"' >> ~/.bashrc"
echo ""
fi
echo "Done. Run 'graphify-core.sh /path/to/project' to build your first graph."