From 6cb859eeffe708cf75bec7333a8a23be00b7a9e9 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Tue, 30 Jun 2020 18:13:22 +0000 Subject: [PATCH] use WEBI_HOST rather than webinstall.dev --- _webi/bootstrap.ps1 | 2 +- go/install.sh | 3 ++- postgresql/install.sh | 3 ++- ripgrep/install.sh | 3 ++- rust/install.sh | 3 ++- ssh-utils/ssh-adduser.sh | 5 +++-- 6 files changed, 12 insertions(+), 7 deletions(-) diff --git a/_webi/bootstrap.ps1 b/_webi/bootstrap.ps1 index 5eac194..8ec299c 100644 --- a/_webi/bootstrap.ps1 +++ b/_webi/bootstrap.ps1 @@ -23,7 +23,7 @@ pushd .local\bin # TODO SetStrictMode # TODO Test-Path variable:global:Env:WEBI_HOST ??? -IF(!$Env:WEBI_HOST) +IF(!($Env:WEBI_HOST -eq $null -or $Env:WEBI_HOST -eq "")) { { $Env:WEBI_HOST = "https://webinstall.dev" } diff --git a/go/install.sh b/go/install.sh index f03c2cd..613fde2 100644 --- a/go/install.sh +++ b/go/install.sh @@ -6,4 +6,5 @@ # See https://webinstall.dev/golang echo "'go@${WEBI_TAG:-stable}' is an alias for 'golang@${WEBI_VERSION:-}'" -curl -fsSL https://webinstall.dev/golang@${WEBI_VERSION:-} | bash +WEBI_HOST=${WEBI_HOST:-"https://webinstall.dev"} +curl -fsSL "$WEBI_HOST/golang@${WEBI_VERSION:-}" | bash diff --git a/postgresql/install.sh b/postgresql/install.sh index 68b2e2b..3254244 100644 --- a/postgresql/install.sh +++ b/postgresql/install.sh @@ -6,4 +6,5 @@ # See https://webinstall.dev/postgres echo "'postgresql' is an alias for 'postgres'" -curl -fsSL https://webinstall.dev/postgres@${WEBI_VERSION:-} | bash +WEBI_HOST=${WEBI_HOST:-"https://webinstall.dev"} +curl -fsSL "$WEBI_HOST/postgres@${WEBI_VERSION:-}" | bash diff --git a/ripgrep/install.sh b/ripgrep/install.sh index 1805ebb..59b5ea7 100644 --- a/ripgrep/install.sh +++ b/ripgrep/install.sh @@ -6,4 +6,5 @@ # See https://webinstall.dev/rg echo "'ripgrep@${WEBI_TAG:-}' (project) is an alias for 'rg@${WEBI_VERSION:-}' (command)" -curl -fsSL https://webinstall.dev/rg@${WEBI_VERSION:-} | bash +WEBI_HOST=${WEBI_HOST:-"https://webinstall.dev"} +curl -fsSL "$WEBI_HOST/rg@${WEBI_VERSION:-}" | bash diff --git a/rust/install.sh b/rust/install.sh index ae4a4ac..6f2f87e 100644 --- a/rust/install.sh +++ b/rust/install.sh @@ -6,4 +6,5 @@ # See https://webinstall.dev/rustlang echo "'rust' is an alias for 'rustlang'" -curl -fsSL https://webinstall.dev/rustlang@${WEBI_VERSION:-} | bash +WEBI_HOST=${WEBI_HOST:-"https://webinstall.dev"} +curl -fsSL "$WEBI_HOST/rustlang@${WEBI_VERSION:-}" | bash diff --git a/ssh-utils/ssh-adduser.sh b/ssh-utils/ssh-adduser.sh index 47aefae..27c6dc8 100644 --- a/ssh-utils/ssh-adduser.sh +++ b/ssh-utils/ssh-adduser.sh @@ -39,8 +39,9 @@ sudo -i -u app bash -c 'ssh-keygen -b 2048 -t rsa -f /home/app/.ssh/id_rsa -q -N ""' # Install webi for the new 'app' user - sudo -i -u app bash -c 'curl -fsSL https://webinstall.dev/webi | bash' \ - || sudo -i -u app bash -c 'wget -q -O - https://webinstall.dev/webi | bash' + WEBI_HOST=${WEBI_HOST:-"https://webinstall.dev"} + sudo -i -u app bash -c "curl -fsSL '$WEBI_HOST/webi' | bash" \ + || sudo -i -u app bash -c "wget -q -O - '$WEBI_HOST/webi' | bash" # TODO ensure that ssh-password login is off -- 2.25.1