summaryrefslogtreecommitdiff
path: root/build-all-with-docker
diff options
context:
space:
mode:
authorErich Eckner <erich.eckner.ext@bestsecret.com>2024-08-02 12:53:56 +0200
committerErich Eckner <erich.eckner.ext@bestsecret.com>2024-08-02 12:53:56 +0200
commit445fef6c184b05150cb435d271d039af816e8e11 (patch)
treeedad6851be9ba5d38a3eb3c42611b1c3535ec459 /build-all-with-docker
parent315f7a9d815374c047ad5e1ca32f040df507e035 (diff)
downloadarchlinuxewe-445fef6c184b05150cb435d271d039af816e8e11.tar.xz
build-all-with-docker: enable to run for a single package
* also parse the arguments more strictly
Diffstat (limited to 'build-all-with-docker')
-rwxr-xr-xbuild-all-with-docker21
1 files changed, 21 insertions, 0 deletions
diff --git a/build-all-with-docker b/build-all-with-docker
index 1aa62d026..00a973e15 100755
--- a/build-all-with-docker
+++ b/build-all-with-docker
@@ -2,6 +2,20 @@
cd "$(dirname "$(readlink -e "$0")")"
+if [ $# -eq 1 ] \
+&& [ -z "${1##*/PKGBUILD}" ] \
+&& [ -f "$1" ]; then
+ cd "${1%/PKGBUILD}"
+ ../addPkgbuildPatch add
+ {
+ printf '%s-build:latest\n' arch artix
+ printf 'arch32-%s-build\n' i486 i686 pentium4
+ } \
+ | shuf \
+ | xargs -rn1 docker run --rm -d -v .:/build
+ exit
+fi
+
exec 9> build-all-with-docker.lock
if ! flock -n 9; then
>&2 echo 'another build-all-with-docker still holds the lock'
@@ -19,6 +33,13 @@ if [ "x$1" = 'x--pull' ]; then
fi
fi
+if [ $# -ne 0 ]; then
+ >&2 printf 'too many parameters:'
+ >&2 printf ' "%s"' "$@"
+ >&2 printf '\n'
+ exit 1
+fi
+
if [ -n "$(git status --porcelain)" ]; then
>&2 echo 'git is not clean'
exit 1