From f338f327377840c2116ad289461533c3b8bdd5f9 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Sun, 11 Aug 2019 14:10:10 +0200 Subject: [PATCH] Add support for multi-package builds Signed-off-by: Knut Ahlers --- run.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/run.sh b/run.sh index e2e4f3c..5516f26 100755 --- a/run.sh +++ b/run.sh @@ -36,7 +36,7 @@ gosu builder getkeys.sh # Execute the build itself gosu builder makepkg ${MAKEPKG_OPTS[@]} -PACKAGE=$(ls *.pkg.tar.xz) # This should be only one file +PACKAGE=($(ls *.pkg.tar.xz)) REPODB=$(find /repo -name '*.db.tar.xz') if [ -z "${REPODB}" ]; then @@ -45,7 +45,9 @@ if [ -z "${REPODB}" ]; then exit 0 fi -gosu builder mv ${PACKAGE}* /repo +for pkg_file in "${PACKAGE[@]}"; do + gosu builder mv ${pkg_file}* /repo -cd /repo -gosu builder repo-add ${REPOADD_OPTS[@]} ${REPODB} "${PACKAGE}" + cd /repo + gosu builder repo-add ${REPOADD_OPTS[@]} ${REPODB} "${pkg_file}" +done