aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiam McLoughlin <hexxeh@hexxeh.net>2011-07-15 21:41:32 +0100
committerLiam McLoughlin <hexxeh@hexxeh.net>2011-07-15 21:41:32 +0100
commit5010a66fb5f1213650410f6fa737dc6db96d8b37 (patch)
treec81cf8c8e28e92cd8952ebd3eaf4c3975fd87316
parentLet's try not to nuke /dev if things go wrong (diff)
downloadgentoaster-5010a66fb5f1213650410f6fa737dc6db96d8b37.tar.gz
gentoaster-5010a66fb5f1213650410f6fa737dc6db96d8b37.tar.bz2
gentoaster-5010a66fb5f1213650410f6fa737dc6db96d8b37.zip
Also, let's NOT trash the log file when things go wrong. REALLY bad idea.
-rwxr-xr-xcreate_image.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/create_image.sh b/create_image.sh
index 77664f1..cc4e366 100755
--- a/create_image.sh
+++ b/create_image.sh
@@ -73,6 +73,7 @@ cleanup_mounts() {
handle_error() {
echo "$1"
cd ${IMAGE_WORK_PATH}
+ mv ${LOG_FILE} ${IMAGES_OUTPUT_PATH}/${BUILD_ID}.log || handle_error "Error moving log file"
cleanup_mounts && rm -rf ${IMAGE_WORK_PATH}
exit 1
}