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
# 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
fi
if [ ! "dnf list installed | grep netcat" ] ; then
if [ -z $(dnf list installed | grep netcat) ] ; then
dnf install -y netcat $QUIET
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
# 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
fi
if [ ! "dnf list installed | grep netcat" ] ; then
if [ -z $(dnf list installed | grep netcat) ] ; then
dnf install -y netcat $QUIET
fi

View File

@ -33,10 +33,10 @@ source "$SCRIPT_DIR"/koji-parameters.sh
KOJI_BUILD_FQDN="$(hostname -f)"
# 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
fi
if [ ! "dnf list installed | grep koji-builder" ] ; then
if [ -z $(dnf list installed | grep koji-builder) ] ; then
dnf install -y koji-builder
fi

View File

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

View File

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