feat: bootstrap scripts auto-launch the installer
get-cameleer.sh and get-cameleer.ps1 now download the installer files and exec install.sh / install.ps1 immediately instead of just printing a "run this next" hint. Extra arguments are forwarded to the installer. PowerShell bootstrap fetches install.ps1 (not install.sh) so Windows users no longer need bash. README updated to use the bash -c "$(curl ...)" form so install.sh's interactive prompts inherit the user's TTY. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -3,18 +3,20 @@ set -euo pipefail
|
||||
|
||||
# Bootstrap script — downloads the Cameleer installer and runs it.
|
||||
# Usage:
|
||||
# curl -fsSL https://get.cameleer.io/install | bash
|
||||
# curl -fsSL https://get.cameleer.io/install | bash -s -- --version v1.2.0
|
||||
# bash -c "$(curl -fsSL https://get.cameleer.io/install)"
|
||||
# bash -c "$(curl -fsSL https://get.cameleer.io/install)" -- --version v1.2.0
|
||||
|
||||
REPO="https://registry.cameleer.io/cameleer/cameleer-saas-installer/raw"
|
||||
REF="branch/main"
|
||||
DIR="./installer"
|
||||
|
||||
# Parse --version / --ref
|
||||
# Parse --version / --ref (consume them; remaining args are forwarded to install.sh)
|
||||
PASS_ARGS=()
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
--version=*) REF="tag/${arg#*=}"; shift ;;
|
||||
--ref=*) REF="branch/${arg#*=}"; shift ;;
|
||||
--version=*) REF="tag/${arg#*=}" ;;
|
||||
--ref=*) REF="branch/${arg#*=}" ;;
|
||||
*) PASS_ARGS+=("$arg") ;;
|
||||
esac
|
||||
done
|
||||
|
||||
@@ -43,13 +45,8 @@ done
|
||||
chmod +x "$DIR/install.sh"
|
||||
|
||||
echo ""
|
||||
echo "Installer ready in $DIR/"
|
||||
echo "Run: cd $DIR && ./install.sh"
|
||||
echo "Installer downloaded to $DIR/ — launching..."
|
||||
echo ""
|
||||
|
||||
# Auto-run if not piped with extra args that look like they want manual control
|
||||
if [ "${1:-}" = "--run" ]; then
|
||||
shift
|
||||
cd "$DIR"
|
||||
exec ./install.sh "$@"
|
||||
fi
|
||||
cd "$DIR"
|
||||
exec ./install.sh "${PASS_ARGS[@]}"
|
||||
|
||||
Reference in New Issue
Block a user