From 032baad8635f0d104dd60776bd788faaa68c490b Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Wed, 10 Jun 2015 08:16:53 +0200 Subject: [PATCH] contrib: ci-upload-helper.sh: import CI uploader script from setup-scripts Signed-off-by: Koen Kooi --- contrib/ci-upload-helper.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 contrib/ci-upload-helper.sh diff --git a/contrib/ci-upload-helper.sh b/contrib/ci-upload-helper.sh new file mode 100755 index 0000000..fab7f3b --- /dev/null +++ b/contrib/ci-upload-helper.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +HOST="$1" +nightlydir="$2" + +# create directory on remote machines +ssh ${HOST} "mkdir -p ${nightlydir}" + +mkdir -p deploy/glibc/images + +# Compress raw images and extX files if needed +for i in $(find deploy/glibc/images/ -name "A*.ext3"; find deploy/glibc/images/ -name "A*img" ; find deploy/glibc/images/ -name "A*.ext2" ; find deploy/glibc/images/ -name "A*.ext4" ; find deploy/glibc/images/ -name "A*sdcard" ; find deploy/glibc/images/ -name "A*iso") ; do xz -f -v -z -T0 -9 -e $i ; done + +# Clean up broken symlinks +find deploy/glibc/images/ -type l -exec sh -c "file -b {} | grep -q ^broken" \; -print | xargs rm || true + +# Copy over images/kernels/modules/etc +rsync -l deploy/glibc/images/$machine/* ${HOST}:${nightlydir}