From 2d881ff4f82bc4be019e76efef080a63fd216099 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Tue, 24 Oct 2006 04:21:35 +0000 Subject: switched from if to case statement so I can use a wildcard at the end of the test for mingw, since the uname varies depending on the Windows version svn path=/trunk/; revision=6158 --- scripts/auto-build/pd-extended-auto-builder.sh | 21 ++++++++++++--------- scripts/auto-build/run-automated-builder | 14 +++++++++----- 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/scripts/auto-build/pd-extended-auto-builder.sh b/scripts/auto-build/pd-extended-auto-builder.sh index b8c32fce..145a2f99 100755 --- a/scripts/auto-build/pd-extended-auto-builder.sh +++ b/scripts/auto-build/pd-extended-auto-builder.sh @@ -60,15 +60,18 @@ upload_build () echo "upload specs $1 $2 $3" echo "Uploading $archive" upload_filename=`ls -1 ${archive} | sed "s|.*/\(.*\)\.${archive_format}|\1-${HOSTNAME}.${archive_format}|"` - if [ "x$SYSTEM" == "xmingw" ]; then - test -e ${archive} && /c/cygwin/bin/sh --login -c "rsync -a ${archive} \ - rsync://128.238.56.50/upload/${DATE}/${upload_filename}" && \ - echo SUCCESS - else - test -e ${archive} && rsync -a ${archive} \ - rsync://128.238.56.50/upload/${DATE}/${upload_filename} && \ - echo SUCCESS - fi + case $SYSTEM in + mingw*) + test -e ${archive} && /c/cygwin/bin/sh --login -c \ + "rsync -a ${archive} rsync://128.238.56.50/upload/${DATE}/${upload_filename}" &&\ + echo SUCCESS + ;; + *) + test -e ${archive} && rsync -a ${archive} \ + rsync://128.238.56.50/upload/${DATE}/${upload_filename} && \ + echo SUCCESS + ;; + esac } diff --git a/scripts/auto-build/run-automated-builder b/scripts/auto-build/run-automated-builder index 4d9dbe15..28a9b3c3 100755 --- a/scripts/auto-build/run-automated-builder +++ b/scripts/auto-build/run-automated-builder @@ -16,11 +16,15 @@ run_build_script () sh /home/pd/auto-build/${distro}/scripts/auto-build/${distro}-auto-builder.sh >> $LOGFILE 2>&1 -if [ "x$SYSTEM" == "xmingw" ]; then - /c/cygwin/bin/sh --login -c "rsync -a ${LOGFILE} rsync://128.238.56.50/upload/${DATE}/logs/" -else - rsync -a ${LOGFILE} rsync://128.238.56.50/upload/${DATE}/logs/ -fi + case $SYSTEM in + mingw*) + /c/cygwin/bin/sh --login -c \ + "rsync -a ${LOGFILE} rsync://128.238.56.50/upload/${DATE}/logs/" + ;; + *) + rsync -a ${LOGFILE} rsync://128.238.56.50/upload/${DATE}/logs/ + ;; + esac # send status report if something failed completion_test=`tail -1 ${LOGFILE}` -- cgit v1.2.1