makechrootpkg: Keep source files even if build fails

implementes FS#18437
This commit is contained in:
Pierre Schmitz 2010-03-03 21:49:22 +01:00
parent a7c5010d24
commit 17e875f6b3
1 changed files with 9 additions and 9 deletions

View File

@ -221,15 +221,6 @@ if mkarchroot -r "/chrootbuild" "$copydir"; then
fi fi
done 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 for l in "${copydir}"/build/*-{build,package}.log; do
[ -f "$l" ] && mv "$l" "${WORKDIR}" [ -f "$l" ] && mv "$l" "${WORKDIR}"
done done
@ -238,6 +229,15 @@ else
touch "${copydir}/build/BUILD_FAILED" touch "${copydir}/build/BUILD_FAILED"
fi 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 if [ -e "${copydir}/build/BUILD_FAILED" ]; then
echo "Build failed, check $copydir/build" echo "Build failed, check $copydir/build"
rm "${copydir}/build/BUILD_FAILED" rm "${copydir}/build/BUILD_FAILED"