Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArmin Luntzer <armin@archlinuxppc.org>2007-11-22 19:56:44 +0100
committerJason Chu <jchu@xentac.net>2007-11-27 16:45:28 -0800
commitceb84394f9927d04543815b03d3b6c31f478669d (patch)
tree196f4103d902104118555ecb2665717788656dd4
parente71c9784b51ea218aaae7edb6a3d3d457aa02e8e (diff)
makechrootpkg: Check if build was successful. Copy package to cwd and cleanup $chrootdir/rw/build on success, keep directory contents on failure.
Signed-off-by: Jason Chu <jchu@xentac.net>
-rwxr-xr-xmakechrootpkg15
1 files changed, 12 insertions, 3 deletions
diff --git a/makechrootpkg b/makechrootpkg
index 2a6e1b0..3fad3f0 100755
--- a/makechrootpkg
+++ b/makechrootpkg
@@ -11,6 +11,7 @@
FORCE="n"
RUN=""
MAKEPKG_ARGS="-Ss"
+WORKDIR=$PWD
chrootdir="$CHROOT_SHELL"
@@ -114,12 +115,20 @@ fi
#!/bin/bash
export LANG=$LOCALE
cd /build
-sudo -u nobody makepkg $MAKEPKG_ARGS
+sudo -u nobody makepkg $MAKEPKG_ARGS || touch BUILD_FAILED
EOF
) > "$uniondir/chrootbuild"
chmod +x "$uniondir/chrootbuild"
mkarchroot -r "/chrootbuild" "$uniondir"
-# TODO move relevant files here
-echo "build complete... check \$CHROOT_SHELL/build for build results"
+if [ -e ${chrootdir}/rw/build/BUILD_FAILED ]; then
+ echo "Build failed, check \$CHROOT_DIR/rw/build"
+ rm ${chrootdir}/rw/build/BUILD_FAILED
+ exit 1
+else
+ source ${WORKDIR}/PKGBUILD
+ mv ${chrootdir}/rw/build/${pkgname}-${pkgver}-*.pkg.tar.gz ${WORKDIR}
+ rm -rf ${chrootdir}/rw/build/*
+ echo "Build complete"
+fi