-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·21 lines (19 loc) · 815 Bytes
/
Copy pathinstall.sh
File metadata and controls
executable file
·21 lines (19 loc) · 815 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env bash
# gen-z installer shim. Delegates to the Node installer. No per-OS logic lives
# here on purpose: one source of truth in bin/install.js, no bash quoting bugs.
#
# curl -fsSL https://raw.githubusercontent.com/kopon1/gen-z/main/install.sh | bash
#
# From a local clone, just run: node bin/install.js
set -euo pipefail
if ! command -v node >/dev/null 2>&1; then
echo "gen-z: Node.js is required (>=18). Install from https://nodejs.org and re-run." >&2
exit 1
fi
# If run from inside a clone, use the local installer. Otherwise fetch via npx.
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]:-$0}")" 2>/dev/null && pwd || true)"
if [ -n "$SCRIPT_DIR" ] && [ -f "$SCRIPT_DIR/bin/install.js" ]; then
exec node "$SCRIPT_DIR/bin/install.js" "$@"
else
exec npx -y github:kopon1/gen-z -- "$@"
fi