From 245212e514c3b422e8f47c99257b7a25935b3d2a Mon Sep 17 00:00:00 2001 From: Geert Janssens Date: Sat, 26 Mar 2011 10:50:18 +0000 Subject: [PATCH] Windows nightly build: fix webserver directory creation hack BP git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20487 57a11ea4-9604-0410-9ed3-97b8803252fd --- packaging/win32/build_package.sh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/packaging/win32/build_package.sh b/packaging/win32/build_package.sh index 779510707b..cb280dff62 100644 --- a/packaging/win32/build_package.sh +++ b/packaging/win32/build_package.sh @@ -7,10 +7,11 @@ # set -e +LOG_DIR=build-logs function on_error() { if [ `hostname` = "gnucash-win32" ]; then - scp -p ${LOGFILE} upload@code.gnucash.org:public_html/win32/build-logs + scp -p ${LOGFILE} upload@code.gnucash.org:public_html/win32/$LOG_DIR fi exit } @@ -38,11 +39,11 @@ _OUTPUT_DIR=`unix_path $OUTPUT_DIR` LOGFILE=${_OUTPUT_DIR}/${LOGFILENAME} mkdir -p ${_OUTPUT_DIR} +# Small hack to create $LOG_DIR on the webserver if it doesn't exist yet if [ `hostname` = "gnucash-win32" ]; then - # Small hack to create the build-logs directory if it doesn't exist yet - mkdir "$TMP_DIR/build-logs" - scp -r "$TMP_DIR/build-logs" upload@code.gnucash.org:public_html/win32 - rmdir "$TMP_DIR/build-logs" + mkdir "$_OUTPUT_DIR/$LOG_DIR" + scp -r "$_OUTPUT_DIR/$LOG_DIR" upload@code.gnucash.org:public_html/win32 + rmdir "$_OUTPUT_DIR/$LOG_DIR" fi set +e @@ -91,13 +92,12 @@ if [ -n "${tag}" ] ; then fi # If we're running on the build server then upload the files -# Note: change this target if you're building a different branch if [ `hostname` = "gnucash-win32" ]; then - # Small hack to create the target directory if it doesn't exist yet - mkdir "$TMP_DIR/$TARGET_DIR" - scp -r "$TMP_DIR/$TARGET_DIR" upload@code.gnucash.org:public_html/win32 - rmdir "$TMP_DIR/$TARGET_DIR" + # Small hack to create the $TARGET_DIR on the webserver if it doesn't exist yet + mkdir "$_OUTPUT_DIR/$TARGET_DIR" + scp -r "$_OUTPUT_DIR/$TARGET_DIR" upload@code.gnucash.org:public_html/win32 + rmdir "$_OUTPUT_DIR/$TARGET_DIR" # Copy the files to the chosen target directory - scp -p ${LOGFILE} upload@code.gnucash.org:public_html/win32/build-logs + scp -p ${LOGFILE} upload@code.gnucash.org:public_html/win32/$LOG_DIR scp -p ${_OUTPUT_DIR}/${SETUP_FILENAME} upload@code.gnucash.org:public_html/win32/$TARGET_DIR fi