From 17e875f6b315ee7ef60f39345a58529cc44c06ce Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 3 Mar 2010 21:49:22 +0100 Subject: makechrootpkg: Keep source files even if build fails implementes FS#18437 --- makechrootpkg | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/makechrootpkg b/makechrootpkg index a81cba2..c1e78d9 100755 --- a/makechrootpkg +++ b/makechrootpkg @@ -221,15 +221,6 @@ if mkarchroot -r "/chrootbuild" "$copydir"; then fi done - for f in "${copydir}"/srcdest/*; do - [ -e "$f" ] || continue - if [ -d "$SRCDEST" ]; then - mv "$f" "${SRCDEST}" - else - mv "$f" "${WORKDIR}" - fi - done - for l in "${copydir}"/build/*-{build,package}.log; do [ -f "$l" ] && mv "$l" "${WORKDIR}" done @@ -238,6 +229,15 @@ else touch "${copydir}/build/BUILD_FAILED" fi +for f in "${copydir}"/srcdest/*; do + [ -e "$f" ] || continue + if [ -d "$SRCDEST" ]; then + mv "$f" "${SRCDEST}" + else + mv "$f" "${WORKDIR}" + fi +done + if [ -e "${copydir}/build/BUILD_FAILED" ]; then echo "Build failed, check $copydir/build" rm "${copydir}/build/BUILD_FAILED" -- cgit v1.2.3-24-g4f1b