diff --git a/install-koji-farm.sh b/install-koji-farm.sh index c293df4..38f6f3f 100644 --- a/install-koji-farm.sh +++ b/install-koji-farm.sh @@ -5,7 +5,7 @@ DEBUG= KOJI_HUB_FQDN="$(hostname -f)" KOJI_WEB_FQDN=$KOJI_HUB_FQDN KOJI_BUILD_FQDNS= -for param in $1 $2 $3 $4 $5 $6 $7; do +for param in "$@"; do if [ $param ] ; then case $param in debug ) @@ -230,13 +230,11 @@ deploy_builder () { koji-add-builder.sh $FQDN $DEBUG } -# if builders added as command line parameters, use those -if [ $KOJI_BUILD_FQDNS ] ; then - for FQDN in ${KOJI_BUILD_FQDNS} ; do - deploy_builder $FQDN - done -else -# otherwise prompt for builders +if [ -z $KOJI_BUILD_FQDNS ] ; then + # use hub if no builders entered + deploy-builder $KOJI_HUB_FQDN +elif [ $KOJI_BUILD_FQDNS = "prompt" ] ; then + # prompt for builders echo "We will now deploy koji to your build servers" MSG="Press to use your hub ($KOJI_HUB_FQDN), or enter the FQDN of your first build server) " BSNO=1 @@ -254,6 +252,11 @@ else deploy_builder $FQDN ((BSNO=BSNO+1)) done +else + # use builders added as command line parameters + for FQDN in ${KOJI_BUILD_FQDNS} ; do + deploy_builder $FQDN + done fi # bootstrap the targets etc.