change install to be all-in-one with no parameters

This commit is contained in:
Trevor Batley 2023-09-15 09:06:04 +10:00
parent d404df554a
commit 7356bfb93a

View File

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