-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap.sh
More file actions
executable file
·28 lines (24 loc) · 1.02 KB
/
Copy pathbootstrap.sh
File metadata and controls
executable file
·28 lines (24 loc) · 1.02 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
#!/usr/bin/env bash
#
# ai-dev-kit remote bootstrap.
# Clones (or updates) ai-dev-kit, then runs setup.sh against the current directory.
#
# curl -fsSL https://raw.githubusercontent.com/VM-development/ai-dev-kit/main/bootstrap.sh | bash
# wget -qO- https://raw.githubusercontent.com/VM-development/ai-dev-kit/main/bootstrap.sh | bash
#
# (Flags after `bash -s --` are forwarded to setup.sh with either downloader.)
# Override the source repo / cache dir with ADK_REPO / ADK_DEST env vars.
#
set -euo pipefail
ADK_REPO="${ADK_REPO:-https://github.com/VM-development/ai-dev-kit.git}"
ADK_DEST="${ADK_DEST:-$HOME/.ai-dev-kit}"
TARGET="$(pwd)"
command -v git >/dev/null 2>&1 || { echo "git is required" >&2; exit 1; }
if [ -d "$ADK_DEST/.git" ]; then
echo "Updating ai-dev-kit in $ADK_DEST..."
git -C "$ADK_DEST" pull --ff-only || echo "(could not fast-forward; using existing copy)"
else
echo "Cloning ai-dev-kit into $ADK_DEST..."
git clone --depth 1 "$ADK_REPO" "$ADK_DEST"
fi
exec bash "$ADK_DEST/setup.sh" "$TARGET" ${@+"$@"}