summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2023-08-19 17:44:59 +0200
committerRemi Collet <remi@php.net>2023-08-19 17:44:59 +0200
commit549475c8804d5be8d3531da2550c158ab58cf113 (patch)
tree9bc8266e3ec09717c5ecef1584474fdf6f575c93
parent9a6d74a13baad36bde3f46154b03e8a3d45494eb (diff)
another helper to run all builds for 1 distro
-rwxr-xr-xmockit64
1 files changed, 64 insertions, 0 deletions
diff --git a/mockit b/mockit
new file mode 100755
index 0000000..afb575c
--- /dev/null
+++ b/mockit
@@ -0,0 +1,64 @@
+#!/bin/bash
+
+if [ "$2" = "" ]; then
+ echo usage SRPM distro [ min_ver [, max_ver [, mock_options ]]]
+ exit 0
+fi
+SRPM=$1
+DIST=$2
+shift 2
+if [ "$1" = "" ]; then
+ MIN=0
+else
+ MIN=$1
+ shift
+fi
+if [ "$1" = "" ]; then
+ MAX=999
+else
+ MAX=$1
+ shift
+fi
+
+mocketc=/home/rpmbuild/SPECS/remirepo/tools/mock
+
+if [ ! -f $SRPM ]; then
+ echo "file not found '$SRPM'"
+ exit 1
+fi
+echo mockit $SRPM $DIST $MIN $MAX $@
+case $DIST in
+ fc36x|fc37x|fc38x|el9x)
+ LST="81 74 80 82"
+ SCL="74 80 81 82 83"
+ ;;
+ el8x)
+ LST="72 73 74 80 81 82"
+ SCL="56 70 71 72 73 74 80 81 82 83"
+ ;;
+ el7x)
+ LST="54 55 56 70 71 72 73 74 80 81 82"
+ SCL="54 55 56 70 71 72 73 74 80 81 82 83"
+ ;;
+ *)
+ Unkown DIST $DIST
+ exit 1
+ ;;
+esac
+
+for i in $LST
+do
+ if [ $i -ge $MIN -a $i -le $MAX ]; then
+ echo -n "$(date +%X) $i "
+ mock -q --configdir=$mocketc -r ${DIST}${i} rebuild $SRPM "$@" && echo " Ok." || echo " Error !"
+ fi
+done
+for i in $SCL
+do
+ if [ $i -ge $MIN -a $i -le $MAX ]; then
+ echo -n "$(date +%X) $i "
+ mock -q --configdir=$mocketc -r ${DIST}scl${i} rebuild $SRPM "$@" && echo " Ok." || echo " Error !"
+ fi
+done
+date +%X
+