pungi-rocky/rc.sh

32 lines
963 B
Bash

#!/bin/bash
export LC_ALL=C
LABEL=$1
shift
CONFIG="rocky-8.conf"
TARGET_DIR="/tmp/koji/compose/8"
NIGHTLY=""
SKIP_PHASES="--skip-phase=productimg"
DEST=$(pwd)
DATE=$(date "%Y%m%d")
COMPSFILE="comps-rocky-8.3.xml"
TMPDIR=$(mktemp -d /tmp/rockyrc.$DATE.XXXX)
pushd $TMPDIR
git clone https://git.rockylinux.org/rocky-comps.git && {
pushd rocky-comps
make "${COMPSFILE}"
cp "${COMPSFILE}" $DEST/
popd
}
popd
## Fedora seems to use fedmsg, is it needed?
#CMD="pungi-koji --notification-script=/usr/bin/pungi-fedmsg-notification --notification-script=pungi-wait-for-signed-ostree-handler --config=$CONFIG --old-composes=$TARGET_DIR $OLD_COMPOSES_DIR $NIGHTLY $SKIP_PHASES --label=$LABEL"
CMD="pungi-koji --config=$CONFIG --old-composes=$TARGET_DIR $OLD_COMPOSES_DIR $NIGHTLY $SKIP_PHASES --label=$LABEL"
if [ -z "$COMPOSE_ID" ]; then
CMD="$CMD --target-dir=$TARGET_DIR"
else
CMD="$CMD --debug-mode --compose-dir=$TARGET_DIR/$COMPOSE_ID"
fi
time $CMD "$@"