aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/auto-build/auto-build-common9
-rwxr-xr-xscripts/auto-build/pd-extended-source-tarball.sh19
-rwxr-xr-xscripts/auto-build/run-automated-builder18
3 files changed, 15 insertions, 31 deletions
diff --git a/scripts/auto-build/auto-build-common b/scripts/auto-build/auto-build-common
index f0d75424..8280035b 100644
--- a/scripts/auto-build/auto-build-common
+++ b/scripts/auto-build/auto-build-common
@@ -65,6 +65,15 @@ print_ip_address()
fi
}
+rsync_file()
+{
+ file=$1
+ subdir_file=$2
+ # if the rsync fails, ignore and carry on
+ (rsync -a --chmod=a+r -e ssh ${file} ${RSYNC_SERVER}:/home/apt/www/auto-build/$subdir_file && \
+ echo "successfully uploaded: $(basename $file)") || \
+ true
+}
rsync_distro()
{
diff --git a/scripts/auto-build/pd-extended-source-tarball.sh b/scripts/auto-build/pd-extended-source-tarball.sh
index de4e5efc..739c615b 100755
--- a/scripts/auto-build/pd-extended-source-tarball.sh
+++ b/scripts/auto-build/pd-extended-source-tarball.sh
@@ -6,22 +6,13 @@ set -x
# Any subsequent commands which fail will cause the shell script to exit
set -e
-rsync_file()
-{
- file=$1
- file_upload=$(basename $file)
- # if the rsync fails, ignore and carry on
- (rsync -a --chmod=a+r -e ssh ${file} ${RSYNC_SERVER}:/home/apt/www/auto-build/${DATE}/${file_upload} && \
- echo "successfully uploaded: ${file_upload}") || \
- true
-}
-
upload_generated_file()
{
file=$1
- rsync_file $file
+ subdir=$2
+ rsync_file $file $subdir/`basename $file`
md5sum ${file} | sed "s|^\([0-9a-f][0-9a-f]* \)/.*/|\1|" > ${file}.md5
- rsync_file $file.md5
+ rsync_file $file.md5 $subdir/`basename $file`.md5
}
# the source dir where this script is
@@ -40,9 +31,9 @@ $SCRIPT_DIR/pd-extended-auto-builder.sh source-tarball-only
version=$(get_pd_version $auto_build_root_dir)
source=`ls -1 /tmp/Pd-extended*$version*-source.tar.bz2 | tail -1`
-upload_generated_file $source
+upload_generated_file $source $DATE
debian=`ls -1 /tmp/Pd-extended*$version*-source.debian.tar.bz2 | tail -1`
-upload_generated_file $debian
+upload_generated_file $debian $DATE
if [ "$running_on_server" = "yes" ]; then
rm -f -- $source $source.md5
rm -f -- $debian $debian.md5
diff --git a/scripts/auto-build/run-automated-builder b/scripts/auto-build/run-automated-builder
index 4e86ae5e..bbef063c 100755
--- a/scripts/auto-build/run-automated-builder
+++ b/scripts/auto-build/run-automated-builder
@@ -1,12 +1,5 @@
#!/bin/sh
-
-## TODO:
-# - change the logfile name
-# - use a wrapper for rsync to handle platform specifics
-# - check whether rsync (or any other upload mechanism) is present
-# and mail accordingly
-
cd /
# On Mac OS X, there are some handy things in Fink, but don't override the
@@ -53,16 +46,7 @@ run_build_script ()
echo "----------------------------------------" >> "$LOGFILE" 2>&1
sh "$BUILDSCRIPT" >> "$LOGFILE" 2>&1
fi
-
- case $SYSTEM in
- mingw*)
- /c/cygwin/bin/sh -c \
- "rsync --archive --no-links --copy-links ${LOGFILE} rsync://${RSYNC_SERVER}/upload/${DATE}/logs/"
- ;;
- *)
- rsync -a "$LOGFILE" rsync://${RSYNC_SERVER}/upload/${DATE}/logs/
- ;;
- esac
+ rsync_file $LOGFILE ${DATE}/logs/`basename $LOGFILE`
# send status report if something failed
completion_test=$(tail -1 ${LOGFILE})