From 2bf4bee8a3e3c6408287bbcb2643f801f2a0336b Mon Sep 17 00:00:00 2001 From: Geert Janssens Date: Sat, 28 May 2011 09:40:02 +0000 Subject: [PATCH] [20711] Windows build: be sure to restore msys environment even when the build fails git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/branches/2.4@20713 57a11ea4-9604-0410-9ed3-97b8803252fd --- packaging/win32/dist-impl.sh | 4 ++-- packaging/win32/dist.sh | 8 +++++++- packaging/win32/install-impl.sh | 0 packaging/win32/install.sh | 6 ++++++ 4 files changed, 15 insertions(+), 3 deletions(-) mode change 100644 => 100755 packaging/win32/install-impl.sh diff --git a/packaging/win32/dist-impl.sh b/packaging/win32/dist-impl.sh index 0128913a44..34f94a6cde 100755 --- a/packaging/win32/dist-impl.sh +++ b/packaging/win32/dist-impl.sh @@ -52,8 +52,8 @@ Please set AQBANKING_WITH_QT to yes and rerun install.sh first." add_to_env $_GNOME_UDIR/bin PATH # gconftool-2 add_to_env $_EXETYPE_UDIR/bin PATH # exetype - PID=$$ - configure_msys "$PID" "$_MINGW_WFSDIR" + _PID=$$ + configure_msys "$_PID" "$_MINGW_WFSDIR" } function dist_regex() { diff --git a/packaging/win32/dist.sh b/packaging/win32/dist.sh index 7f26067593..986181d57f 100755 --- a/packaging/win32/dist.sh +++ b/packaging/win32/dist.sh @@ -2,6 +2,12 @@ set -e +function on_error() { + setup "An error occurred, exiting." + restore_msys "$_PID" +} +trap on_error ERR + function qpushd() { pushd "$@" >/dev/null; } function qpopd() { popd >/dev/null; } function unix_path() { echo "$*" | sed 's,^\([A-Za-z]\):,/\1,;s,\\,/,g'; } @@ -44,7 +50,7 @@ for step in "${steps[@]}" ; do done setup Restore MSYS -restore_msys "$PID" +restore_msys "$_PID" qpopd diff --git a/packaging/win32/install-impl.sh b/packaging/win32/install-impl.sh old mode 100644 new mode 100755 diff --git a/packaging/win32/install.sh b/packaging/win32/install.sh index ff1da3aa05..dbb3ebb881 100644 --- a/packaging/win32/install.sh +++ b/packaging/win32/install.sh @@ -10,6 +10,12 @@ set -e +function on_error() { + setup "An error occurred, exiting." + restore_msys "$_PID" +} +trap on_error ERR + echo -n "Build Starting at " date