From b3e89bfa55389cae974c94afba6fb4ce118f75df Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 9 Nov 2010 03:05:17 +0100 Subject: Provide deployment (jnlp) and hudson build aggregation scripts --- hudson-builds/archive-verify-latest.sh | 99 ++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100755 hudson-builds/archive-verify-latest.sh (limited to 'hudson-builds/archive-verify-latest.sh') diff --git a/hudson-builds/archive-verify-latest.sh b/hudson-builds/archive-verify-latest.sh new file mode 100755 index 0000000..a149ca8 --- /dev/null +++ b/hudson-builds/archive-verify-latest.sh @@ -0,0 +1,99 @@ +#! /bin/bash + +if [ -z "$1" ] ; then + archive=/srv/www/jogamp.org/deployment/jogamp-next +else + archive=$1 +fi + +logfile=`basename $0 .sh`.log + +rm -rf zips +mkdir zips +cd zips +for i in $archive/*.zip ; do + bname=`basename $i .zip` + unzip -q $i + if [ -e $bname ] ; then + cd $bname + ls > ../$bname.lst + cd .. + else + echo "Error: No folder $bname in $i" + fi +done +cd .. + +rm -rf plain +mkdir plain +cd plain +cp -a $archive/*.jar . +ls > ../plain.lst +cd .. + +rm -rf dump +mkdir dump + +echo "Verifying all files in $archive" +ls -la $archive +echo + +function integrity_check() { + cd dump + for i in ../plain/*.jar ; do + bname=`basename $i` + echo -n "$bname integrity - " + OK=0 + jar xvf $i >& $i.log && OK=1 + if [ $OK -eq 0 ] ; then + echo ERROR + else + echo OK + rm $i.log + fi + done + echo + cd .. +} + +function identity_check() { + mkdir plain/natives + mv plain/*-natives-*jar plain/natives + mkdir plain/demos + mv plain/jogl-demos*jar plain/demos + + cd zips + + for i in ../plain/*.jar ; do + bname=`basename $i` + echo -n "$bname identity - " + OK=0 + for j in `find . -name $bname` ; do + if cmp -s $i $j ; then + OK=1 + echo -n "$j " + fi + done + if [ $OK -eq 0 ] ; then + echo "NONE" + echo "Error: verbose comparison of $bname" + for j in `find . -name $bname` ; do + cmp $i $j + done + else + echo + fi + done + echo + + cd .. + + mv plain/natives/* plain/ + rm -rf plain/natives + mv plain/demos/* plain/ + rm -rf plain/demos +} + +integrity_check 2>&1 | tee $logfile +identity_check 2>&1 | tee $logfile + -- cgit v1.2.3