From 75c37f935fd2df1e755093c9347c392eca7fb7de Mon Sep 17 00:00:00 2001 From: Derek Atkins Date: Fri, 3 Jul 2009 12:57:34 +0000 Subject: [PATCH] Make sure we copy the logfile even on error git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18170 57a11ea4-9604-0410-9ed3-97b8803252fd --- packaging/win32/build_package.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packaging/win32/build_package.sh b/packaging/win32/build_package.sh index 98e465a6b2..3c15dd5170 100644 --- a/packaging/win32/build_package.sh +++ b/packaging/win32/build_package.sh @@ -8,6 +8,13 @@ set -e +function on_error() { + if [ `hostname` = "gnucash-win32" ]; then + scp -p ${LOGFILE} upload@code.gnucash.org:public_html/win32/trunk + fi + exit +} + function unix_path() { echo "$*" | sed 's,^\([A-Za-z]\):,/\1,;s,\\,/,g'; } tag="$1" @@ -22,6 +29,8 @@ _OUTPUT_DIR=`unix_path $OUTPUT_DIR` LOGFILE=${_OUTPUT_DIR}/${LOGFILENAME} mkdir -p ${_OUTPUT_DIR} +trap on_error ERR + # Run the compile ./install.sh 2>&1 | tee ${LOGFILE}