From 5c29d9a8ff3db169a7b65ac6ccb619a984697533 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Tue, 30 Sep 2008 08:26:59 +0000 Subject: replaced `` syntax with $(); added a 1-before-last line to the logfile indicating the uploaded package (LATER use this to rename the logfile to something more meaningful; FIRST wait whether everything still works...) svn path=/trunk/; revision=10317 --- scripts/auto-build/pd-extended-auto-builder.sh | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'scripts/auto-build/pd-extended-auto-builder.sh') diff --git a/scripts/auto-build/pd-extended-auto-builder.sh b/scripts/auto-build/pd-extended-auto-builder.sh index 56824f28..d47d200b 100755 --- a/scripts/auto-build/pd-extended-auto-builder.sh +++ b/scripts/auto-build/pd-extended-auto-builder.sh @@ -2,11 +2,13 @@ # this script is the first attempt to have an automated updater and builder # the source dir where this script is -SCRIPT_DIR=`echo $0 | sed 's|\(.*\)/.*$|\1|'` +## this could be done more easily with ${0%/*} +SCRIPT_DIR=$(echo $0 | sed 's|\(.*\)/.*$|\1|') . $SCRIPT_DIR/auto-build-common # the name of this script -SCRIPT=`echo $0| sed 's|.*/\(.*\)|\1|g'` +## this could be done more easily with ${0##*/} +SCRIPT=$(echo $0| sed 's|.*/\(.*\)|\1|g') BUILD_DIR=. case $SYSTEM in @@ -34,8 +36,9 @@ esac # convert into absolute path -cd `echo $0 | sed 's|\(.*\)/.*$|\1|'`/../.. -auto_build_root_dir=`pwd` +## shouldn't this use the ${SCRIPT_DIR} variable rather than call an external program? +cd $(echo $0 | sed 's|\(.*\)/.*$|\1|')/../.. +auto_build_root_dir=$(pwd) echo "root: $auto_build_root_dir" # let rsync handle the cleanup with --delete @@ -63,11 +66,11 @@ upload_build () build_folder=$2 archive_format=$3 - archive=`ls -1 ${auto_build_root_dir}/packages/${platform_folder}/${build_folder}/Pd*.${archive_format} | tail -1` + archive=$(ls -1 ${auto_build_root_dir}/packages/${platform_folder}/${build_folder}/Pd*.${archive_format} | tail -1) echo "upload specs $1 $2 $3" echo "Uploading $archive" - upload_filename=`ls -1 ${archive} | sed "s|.*/\(.*\)\.${archive_format}|\1-${HOSTNAME}.${archive_format}|"` + upload_filename=$(ls -1 ${archive} | sed "s|.*/\(.*\)\.${archive_format}|\1-${HOSTNAME}.${archive_format}|") if [ -e ${archive} ]; then case $SYSTEM in mingw*) @@ -76,12 +79,14 @@ upload_build () md5sum ${archive} > ${archive}.md5 && \ /c/cygwin/bin/sh -c \ "rsync -a ${archive}.md5 rsync://128.238.56.50/upload/${DATE}/${upload_filename}.md5" && \ + echo "successfully uploaded: ${upload_filename}" && \ echo SUCCESS ;; *) rsync -a ${archive} rsync://128.238.56.50/upload/${DATE}/${upload_filename} && \ md5sum ${archive} > ${archive}.md5 && \ rsync -a ${archive}.md5 rsync://128.238.56.50/upload/${DATE}/${upload_filename}.md5 && \ + echo "successfully uploaded: ${upload_filename}" && \ echo SUCCESS ;; esac -- cgit v1.2.1