Add timeout for makepkg

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2023-02-18 15:57:04 +01:00
parent c7a21ddca0
commit 2daa9d20f4
Signed by: luzifer
GPG key ID: D91C3E91E4CAD6F5

4
run.sh
View file

@ -1,6 +1,8 @@
#!/usr/local/bin/dumb-init /bin/bash
set -euo pipefail
: ${TIMEOUT:=0} # allow to restrict runtime of the makepkg build
MAKEPKG_OPTS=(-cCs --noconfirm --needed)
REPOADD_OPTS=()
SKIP_VERIFY="${SKIP_VERIFY:-}"
@ -64,7 +66,7 @@ pacman -Syyu --noconfirm
gosu builder getkeys.sh
# Execute the build itself
gosu builder makepkg ${MAKEPKG_OPTS[@]}
gosu builder timeout ${TIMEOUT} makepkg ${MAKEPKG_OPTS[@]}
PACKAGE=($(find . -regextype egrep -regex '^.*\.pkg(|\.tar|\.tar\.xz|\.tar\.zst)$'))