[FOray-commit] SF.net SVN: foray: [8253] trunk/foray/scripts/dist-test.sh
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
|
From: <vic...@us...> - 2006-09-30 16:07:58
|
Revision: 8253
http://svn.sourceforge.net/foray/?rev=8253&view=rev
Author: victormote
Date: 2006-09-30 09:07:46 -0700 (Sat, 30 Sep 2006)
Log Message:
-----------
Add script to test the distribution file contents.
Added Paths:
-----------
trunk/foray/scripts/dist-test.sh
Added: trunk/foray/scripts/dist-test.sh
===================================================================
--- trunk/foray/scripts/dist-test.sh (rev 0)
+++ trunk/foray/scripts/dist-test.sh 2006-09-30 16:07:46 UTC (rev 8253)
@@ -0,0 +1,69 @@
+#!/bin/sh
+#
+# The purpose of this script is to test the contents of the distribution files
+# that were created by the build scripts.
+
+# Modify the following variable to the appropriate value before running this
+# script.
+FORAY_VERSION="0.2"
+
+TEMP_DIR=$HOME/tmp
+UNZIP_DIR=$TEMP_DIR/unzip
+FILE_1=$TEMP_DIR/foray-test-1.txt
+FILE_2=$TEMP_DIR/foray-test-2.txt
+FILE_3=$TEMP_DIR/foray-test-3.txt
+
+clear
+
+################################################################################
+# Make sure the content of the two binary distribution files is equivalent.
+################################################################################
+
+if [ ! -d $TEMP_DIR ]
+then
+ mkdir $TEMP_DIR
+fi
+
+mkdir $UNZIP_DIR
+
+# Unzip the "all" zip file
+unzip -q ../build/distribution/foray-$FORAY_VERSION-bin-all.zip -d $UNZIP_DIR
+
+# List and sort the contents of the foray jar files in it
+touch $FILE_1
+for I in `ls $UNZIP_DIR/foray-$FORAY_VERSION-bin-all/lib/foray*.jar`
+do
+ jar -tvf $I >> $FILE_1
+done
+# Pull out the differences due to duplicated directories and manifest files,
+# and sort the content.
+cat $FILE_1 | grep -v META-INF\/$ | grep -v META-INF\/MANIFEST.MF$ \
+ | grep -v org\/$ | grep -v org\/foray\/$ | sort > $FILE_3
+mv $FILE_3 $FILE_1
+rm -rf $UNZIP_DIR/*
+
+# Unzip the "modules" zip file
+unzip -q ../build/distribution/foray-$FORAY_VERSION-bin-modules.zip -d $UNZIP_DIR
+
+# List and sort the contents of the foray jar files in it
+touch $FILE_2
+for I in `ls $UNZIP_DIR/foray-$FORAY_VERSION-bin-modules/lib/foray*.jar`
+do
+ jar -tvf $I >> $FILE_2
+done
+# Pull out the differences due to duplicated directories and manifest files,
+# and sort the content.
+cat $FILE_2 | grep -v META-INF\/$ | grep -v META-INF\/MANIFEST.MF$ \
+ | grep -v org\/$ | grep -v org\/foray\/$ | sort > $FILE_3
+mv $FILE_3 $FILE_2
+
+# Now diff the two files.
+echo "Listing substantial differences between the distribution files"
+diff $FILE_1 $FILE_2 | more
+echo "End of differences"
+
+rm -rf $UNZIP_DIR
+rm $FILE_1
+rm $FILE_2
+
+##### Last Line of Script.
Property changes on: trunk/foray/scripts/dist-test.sh
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ "Author Id Rev Date URL"
Name: svn:eol-style
+ LF
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|