fix check for already installed

This commit is contained in:
Trevor Batley 2023-09-04 16:49:28 +10:00
parent fdda43fade
commit 8cb48b200b
5 changed files with 8 additions and 10 deletions

View File

@ -31,10 +31,10 @@ curl $SILENT $SCRIPT_GIT/koji-bootstrap-build.sh > $SCRIPT_DIR/koji-bootstrap-bu
chmod o+x $SCRIPT_DIR/*.sh chmod o+x $SCRIPT_DIR/*.sh
# install any required packages # install any required packages
if [ ! "dnf list installed | grep epel-release" ] ; then if [ -z $(dnf list installed | grep epel-release) ] ; then
dnf install -y epel-release $QUIET dnf install -y epel-release $QUIET
fi fi
if [ ! "dnf list installed | grep netcat" ] ; then if [ -z $(dnf list installed | grep netcat) ] ; then
dnf install -y netcat $QUIET dnf install -y netcat $QUIET
fi fi

View File

@ -38,10 +38,10 @@ curl $SILENT $SCRIPT_GIT/koji-deploy-hub.sh > $SCRIPT_DIR/koji-deploy-hub.sh
if [ ! -d $SCRIPT_DIR ] ; then mkdir -p $SCRIPT_DIR ; fi if [ ! -d $SCRIPT_DIR ] ; then mkdir -p $SCRIPT_DIR ; fi
# install any required packages # install any required packages
if [ ! "dnf list installed | grep epel-release" ] ; then if [ -z $(dnf list installed | grep epel-release) ] ; then
dnf install -y epel-release $QUIET dnf install -y epel-release $QUIET
fi fi
if [ ! "dnf list installed | grep netcat" ] ; then if [ -z $(dnf list installed | grep netcat) ] ; then
dnf install -y netcat $QUIET dnf install -y netcat $QUIET
fi fi

View File

@ -33,10 +33,10 @@ source "$SCRIPT_DIR"/koji-parameters.sh
KOJI_BUILD_FQDN="$(hostname -f)" KOJI_BUILD_FQDN="$(hostname -f)"
# Install the koji builder componelts from epel # Install the koji builder componelts from epel
if [ ! "dnf list installed | grep epel-release" ] ; then if [ -z $(dnf list installed | grep epel-release) ] ; then
dnf install -y epel-release $QUIET dnf install -y epel-release $QUIET
fi fi
if [ ! "dnf list installed | grep koji-builder" ] ; then if [ -z $(dnf list installed | grep koji-builder) ] ; then
dnf install -y koji-builder dnf install -y koji-builder
fi fi

View File

@ -10,8 +10,6 @@ for param in $1 $2 ; do
case $param in case $param in
debug ) debug )
DEBUG="debug" ;; DEBUG="debug" ;;
* )
KOJI_BUILD_FQDN=$param ;;
esac esac
else else
break break
@ -19,7 +17,7 @@ for param in $1 $2 ; do
done done
if [ $DEBUG ] ; then if [ $DEBUG ] ; then
set -x set -xe
SILENT= SILENT=
QUIET="-v" QUIET="-v"
fi fi

View File

@ -17,7 +17,7 @@ for param in $1 $2 ; do
done done
if [ $DEBUG ] ; then if [ $DEBUG ] ; then
set -x set -xe
SILENT= SILENT=
QUIET="-v" QUIET="-v"
fi fi