[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible_html_rsync_remote_results: check the existence of the old directory before moving
Holger Levsen
holger at layer-acht.org
Sun Jul 24 21:42:28 UTC 2016
This is an automated email from the git hooks/post-receive script.
holger pushed a commit to branch master
in repository jenkins.debian.net.
commit e9bf11fe6952fa6fb8419b312e039963e3a5bcb4
Author: Alexander Couzens <lynxis at fe80.eu>
Date: Sun Jul 24 23:40:09 2016 +0200
reproducible_html_rsync_remote_results: check the existence of the old directory before moving
fails on lede because there isn't any lede directory before
Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
bin/reproducible_html_rsync_remote_results.sh | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/bin/reproducible_html_rsync_remote_results.sh b/bin/reproducible_html_rsync_remote_results.sh
index d459f58..f19b92c 100755
--- a/bin/reproducible_html_rsync_remote_results.sh
+++ b/bin/reproducible_html_rsync_remote_results.sh
@@ -19,15 +19,17 @@ rsync_remote_results() {
rsync -r -v -e "ssh -o 'Batchmode = yes'" profitbricks-build3-amd64.debian.net:$BASE/$PROJECT/ $RESULTS
chmod 775 $RESULTS
# move old results out of the way
- mv $BASE/$PROJECT ${RESULTS}.tmp
- # preserve images and css
- for OBJECT in $(find ${RESULTS}.tmp -name "*css" -o -name "*png" -o -name "*jpg") ; do
- cp -v $OBJECT $RESULTS/
- done
+ if [ -d $BASE/$PROJECT ] ; then
+ mv $BASE/$PROJECT ${RESULTS}.tmp
+ # preserve images and css
+ for OBJECT in $(find ${RESULTS}.tmp -name "*css" -o -name "*png" -o -name "*jpg") ; do
+ cp -v $OBJECT $RESULTS/
+ done
+ # delete the old results
+ rm ${RESULTS}.tmp -r
+ fi
# make the new results visible
mv $RESULTS $BASE/$PROJECT
- # delete the old results
- rm ${RESULTS}.tmp -r
echo "$(date -u) - $REPRODUCIBLE_URL/$PROJECT has been updated."
done
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git
More information about the Qa-jenkins-scm
mailing list