From 660897900ef7c2468c61868025c665e8c820a893 Mon Sep 17 00:00:00 2001 From: Trevor Batley Date: Thu, 7 Sep 2023 13:21:56 +1000 Subject: [PATCH] simplify comparator --- install-koji-farm.sh | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/install-koji-farm.sh b/install-koji-farm.sh index cfa9451..0429721 100644 --- a/install-koji-farm.sh +++ b/install-koji-farm.sh @@ -120,19 +120,17 @@ chmod o+x $SCRIPT_DIR/koji-parameters.sh koji-deploy-hub.sh $DEBUG # add builders -PROMPT="Build server FQDN (will default to hub '$KOJI_HUB_FQDN' if left blank) " +echo "We will now deploy koji to your build servers" +MSG="Press to use your hub ($KOJI_HUB_FQDN), or the FQDN of your first build server) " BSNO=1 while true ; do - read -p "$PROMPT" KOJI_BUILD_FQDN - PROMPT="Build server FQDN. (will stop asking if left blank) " + read -p "Build Server FQDN: " KOJI_BUILD_FQDN + MSG="Add another Build Server (will stop asking if left blank) " if [ -z $KOJI_BUILD_FQDN ] ; then - if [[ $BSNO -gt 1 ]] ; then - break - else - echo "All-in-one: Hub will now be a build server as well" + if [[ ! $BSNO -gt 1 ]] ; then koji-add-builder.sh $DEBUG - break fi + break fi # check if server available on port 22 until (nc -z $KOJI_BUILD_FQDN 22)