diff options
author | Holger Levsen <holger@layer-acht.org> | 2014-10-25 21:22:12 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2014-10-25 21:22:12 +0200 |
commit | 09ce692049a3eb533a3490dbbb249184e9106834 (patch) | |
tree | acd2d2027d2ab30b00b2d99341cba1b09edd0e5f /bin | |
parent | 57140505d94a66ac2310023725df3cca93def495 (diff) | |
download | jenkins.debian.net-09ce692049a3eb533a3490dbbb249184e9106834.tar.xz |
chroot-run: if the debian-edu-doc source package was build, update https://jenkins.debian.net/userContent/debian-edu-doc/ with it's binary packages contents
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/chroot-run.sh | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/bin/chroot-run.sh b/bin/chroot-run.sh index f38befb9..c92e4b73 100755 --- a/bin/chroot-run.sh +++ b/bin/chroot-run.sh @@ -79,6 +79,29 @@ cleanup() { cp -v $CHROOT_TARGET/tmp/testrun/stats.csv $CURDIR fi + # + # special case debian-edu-doc + # + CHANGES=$(cd $CHROOT_TARGET/tmp/ ; ls -1 debian-edu-doc_*.changes 2>/dev/null|| true) + if [ ! -z "$CHANGES" ] ; then + echo "Extracting contents from .deb files..." + cd $CHROOT_TARGET/tmp/ + NEWDOC=$(mktemp -d) + for DEB in $(dcmd --deb $CHANGES) ; do + dpkg --extract $DEB $NEWDOC 2>/dev/null + done + EDUDOC="/var/lib/jenkins/userContent/debian-edu-doc" + rm -rf $EDUDOC + mkdir $EDUDOC + mv $NEWDOC/usr/share/doc/debian-edu-doc-* $EDUDOC/ + rm -r $NEWDOC + MESSAGE="https://jenkins.debian.net/userContent/debian-edu-doc/ has been updated." + kgb-client --conf /srv/jenkins/kgb/debian-edu.conf --relay-msg "$MESSAGE" + echo + echo $MESSAGE + echo + fi + if [ -d $CHROOT_TARGET/proc ]; then sudo umount -l $CHROOT_TARGET/proc || fuser -mv $CHROOT_TARGET/proc fi @@ -117,7 +140,6 @@ EOF bootstrap run "$@" -cleanup - trap - INT TERM EXIT +cleanup |