-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall-web.sh
More file actions
executable file
·28 lines (23 loc) · 1009 Bytes
/
Copy pathinstall-web.sh
File metadata and controls
executable file
·28 lines (23 loc) · 1009 Bytes
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
# Install Catalyst Code with the browser frontend in one command:
# curl -fsSL https://raw.githubusercontent.com/catalystctl/catcode/refs/heads/master/install-web.sh | bash
#
# All additional arguments are forwarded to install.sh, for example:
# ... | bash -s -- --port 8080 --host 127.0.0.1
set -euo pipefail
INSTALLER_URL="${CATCODE_INSTALLER_URL:-https://raw.githubusercontent.com/catalystctl/catcode/refs/heads/master/install.sh}"
SCRIPT_DIR=""
if [[ -n "${BASH_SOURCE[0]:-}" && "${BASH_SOURCE[0]}" != /dev/* ]]; then
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
fi
if [[ -n "$SCRIPT_DIR" && -f "$SCRIPT_DIR/install.sh" ]]; then
exec bash "$SCRIPT_DIR/install.sh" --with-web "$@"
fi
if ! command -v curl >/dev/null 2>&1; then
printf 'error: curl is required to download the Catalyst Code installer\n' >&2
exit 1
fi
tmp="$(mktemp -t catalyst-web-installer.XXXXXX)"
trap 'rm -f "$tmp"' EXIT
curl -fsSL "$INSTALLER_URL" -o "$tmp"
bash "$tmp" --with-web "$@"