-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·60 lines (51 loc) · 1.29 KB
/
install.sh
File metadata and controls
executable file
·60 lines (51 loc) · 1.29 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 sh
set -eu
VERSION="latest"
INSTALL_DIR="${HOME}/.commandboard/bin"
INSTALL_ALIAS=1
while [ "$#" -gt 0 ]; do
case "$1" in
--version)
VERSION="$2"
shift 2
;;
--install-dir)
INSTALL_DIR="$2"
shift 2
;;
--no-alias)
INSTALL_ALIAS=0
shift
;;
*)
echo "Unknown option: $1" >&2
exit 2
;;
esac
done
OS="$(uname -s | tr '[:upper:]' '[:lower:]')"
ARCH="$(uname -m)"
case "$ARCH" in
x86_64) ARCH="x64" ;;
aarch64|arm64) ARCH="arm64" ;;
esac
echo "Installing CommandBoard.run CLI..."
echo "Detected: ${OS} ${ARCH}"
echo "Installing to: ${INSTALL_DIR}"
mkdir -p "$INSTALL_DIR"
cat > "${INSTALL_DIR}/commandboard" <<'BIN'
#!/usr/bin/env sh
echo "CommandBoard.run CLI bootstrap"
echo "Install from a release artifact when v1.0.0 binaries are published."
echo "For local development run: npm --workspace @logicsrc/cli run dev -- \"$@\""
BIN
chmod +x "${INSTALL_DIR}/commandboard"
if [ "$INSTALL_ALIAS" -eq 1 ]; then
ln -sf "${INSTALL_DIR}/commandboard" "${INSTALL_DIR}/cb"
echo "Installed alias: cb"
fi
echo "Installed: commandboard (${VERSION})"
echo "Add this to your shell profile if needed:"
echo "export PATH=\"\$HOME/.commandboard/bin:\$PATH\""
echo "Run: commandboard login"
echo "Run: commandboard tui"