From a23f1ae07593838e2bd1e2e14c7924556dc93972 Mon Sep 17 00:00:00 2001 From: lablans Date: Wed, 22 Feb 2023 12:06:28 +0000 Subject: [PATCH] Automate installation --- lib/prepare-system.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/prepare-system.sh b/lib/prepare-system.sh index 2cba2e2..a0a0215 100755 --- a/lib/prepare-system.sh +++ b/lib/prepare-system.sh @@ -52,8 +52,12 @@ if [ -d /etc/bridgehead ]; then fi else log "INFO" "Now cloning your site configuration repository for you." - read -p "Please enter your site: " site - read -s -p "Please enter the bridgehead's access token for your site configuration repository (will not be echoed): " access_token + if [ -z "$site" ]; then + read -p "Please enter your site: " site + fi + if [ -z "$access_token" ]; then + read -s -p "Please enter the bridgehead's access token for your site configuration repository (will not be echoed): " access_token + fi site_configuration_repository_url="https://bytoken:${access_token}@${site_configuration_repository_middle}$(echo $site | tr '[:upper:]' '[:lower:]').git" git clone $site_configuration_repository_url /etc/bridgehead if [ $? -gt 0 ]; then