diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2022-11-11 00:18:46 +0100 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2022-11-11 00:18:46 +0100 |
commit | 1cb62685afe79e7d3ab5c38b1ff6900c587f96d3 (patch) | |
tree | ef73c4093cc1fc8224e038eae8fccb171fba24c9 /bin | |
parent | 800ded9aac3cb1d735609748a3967af3532d0cd9 (diff) | |
download | aurbuilder-1cb62685afe79e7d3ab5c38b1ff6900c587f96d3.tar.gz |
more working
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/buildpackage.sh | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/bin/buildpackage.sh b/bin/buildpackage.sh index 4be1b3a..ace52fd 100755 --- a/bin/buildpackage.sh +++ b/bin/buildpackage.sh @@ -1,18 +1,26 @@ #!/bin/bash echo "BUILDING: $PACKAGE_NAME" -echo "Build Deps: $BUILD_ALL_AUR_DEPENDS" +echo "PACKAGER: $PACKAGER" cd /workdir || exit 1 -while read NAME BASE VER _; do - echo $NAME $BASE $VER +while read -r NAME BASE VER _; do + echo "$NAME $VER for $ARCH" + OUTNAME="$NAME-$VER-$ARCH.pkg" + + # Only build when needed + if [ ! "$FORCE_REBUILD" = "yes" ] && compgen -G "/pkgout/${OUTNAME}*"; then + echo "$NAME $VER ($ARCH) is already built. Skipping." + continue + fi sudo -u aurbuilder git clone "https://aur.archlinux.org/$BASE.git" "$BASE" cd "$BASE" || exit 1 - # TODO: PKGDEST instead of copy - sudo -u aurbuilder makepkg --syncdeps --noconfirm --install + sudo -u aurbuilder CARCH="$ARCH" PACKAGER="$PACKAGER" PKGDEST="/pkgout/" \ + makepkg --force --syncdeps --noconfirm --install - cp ./*.pkg.tar.zst /pkgout + #cp ./*.pkg.tar.zst /pkgout + test -n "$CHOWN" && sudo chown "$CHOWN" "/pkgout/${OUTNAME}"* done <<< "$(getpackage.py "$PACKAGE_NAME")" |