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:
hsiegeln
2026-04-25 15:35:32 +02:00
parent 528c6d1980
commit 0b092065c5
3 changed files with 35 additions and 28 deletions

View File

@@ -4,12 +4,13 @@
Bootstrap script — downloads the Cameleer installer and runs it.
.EXAMPLE
irm https://registry.cameleer.io/cameleer/cameleer-saas-installer/raw/branch/main/get-cameleer.ps1 | iex
.\get-cameleer.ps1 -Version v1.2.0
& ([scriptblock]::Create((irm https://.../get-cameleer.ps1))) -Version v1.2.0
#>
param(
[string]$Version,
[string]$Ref,
[switch]$Run
[Parameter(ValueFromRemainingArguments = $true)]
[string[]]$InstallerArgs
)
$ErrorActionPreference = 'Stop'
@@ -23,7 +24,7 @@ $Base = "$Repo/$RefPath"
$Dir = '.\installer'
$Files = @(
'install.sh'
'install.ps1'
'templates/docker-compose.yml'
'templates/docker-compose.saas.yml'
'templates/docker-compose.server.yml'
@@ -47,11 +48,13 @@ foreach ($file in $Files) {
}
Write-Host ''
Write-Host "Installer ready in $Dir\"
Write-Host 'Run: cd installer; .\install.sh'
Write-Host "Installer downloaded to $Dir\ — launching..."
Write-Host ''
if ($Run) {
Set-Location $Dir
& .\install.sh @args
Set-Location $Dir
if ($InstallerArgs) {
& .\install.ps1 @InstallerArgs
} else {
& .\install.ps1
}
exit $LASTEXITCODE