mirror of
https://src.koozali.org/infra/smeserver-koji.git
synced 2024-11-25 02:57:28 +01:00
35 lines
1.0 KiB
Bash
35 lines
1.0 KiB
Bash
|
#!/bin/bash
|
||
|
|
||
|
if [[ -z $1 ]] ; then
|
||
|
echo "You need to pass the filename of a list of pkgs to compile"
|
||
|
echo "queue-builds.sh <filename> [ <wait> | <org=smeserver> ]"
|
||
|
echo "- <wait> to wait for one build to complete before submitting the next one (default is nowait - queue them all)"
|
||
|
echo "- <org=organisation> (default is smecontribs)"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
ORG="smecontribs"
|
||
|
WAIT="--nowait"
|
||
|
for var in $2 $3 ; do
|
||
|
case $var in
|
||
|
org=* )
|
||
|
ORG=${var#*=} ;;
|
||
|
wait )
|
||
|
WAIT= ;;
|
||
|
* )
|
||
|
echo "Huh? Var=$var"
|
||
|
echo "You need to pass the filename of a list of pkgs to compile"
|
||
|
echo "queue-builds.sh <filename> [ <wait> | <org=smeserver> ]"
|
||
|
echo "- <wait> to wait for one build to complete before submitting the next one (default is nowait - queue them all)"
|
||
|
echo "- <org=organisation> (default is smecontribs)"
|
||
|
exit 1
|
||
|
esac
|
||
|
done
|
||
|
|
||
|
while read -r PKG ; do
|
||
|
VER=$(curl -s https://src.koozali.org/api/v1/repos/$ORG/$PKG/tags | jq -r '.[0].name')
|
||
|
koji build $WAIT $ORG-11.0 git+https://src.koozali.org/$ORG/$PKG#$VER
|
||
|
done <$1
|
||
|
exit 0
|
||
|
|