#!/bin/bash # Copy over the parts of ARQ that are in the Jena distribtion. # Use (carefully!) to upgrade the copy of ARQ shipped with Jena in place. # !!!! Warning: need to check whether to upgrade jena.jar !!!! export JENAROOT=${JENAROOT:-../Jena2} ## ant jar ## ant javadoc # To copy: # 1/ Jar files # 2/ javadoc, javadoc-all # 3/ Documentation # 4/ Test suite # 5/ Examples # -- Functions function copyDir { local SRC="$1" local DST="$2" echo "copyDir $1 => $2" mkdir -p "$DST" # No CVS or other junk ( cd $SRC ; find . \ -name "CVS" -prune -or \ -name .\?\?\* -prune -or \ -print | cpio -p "$DST" ) } ## # 1 -- jars files ## ## cp -f lib/arq.jar $JENAROOT/lib ## # 2 -- Javadoc rm -rf $JENAROOT/doc/ARQ/javadoc cp -R doc/javadoc $JENAROOT/doc/ARQ/javadoc ## ant javadoc-all ## rm -rf $JENAROOT/doc/ARQ/javadoc-all/* ## cp -R doc/javadoc-all # 3 -- Documentation (avoid CVS directories and files) # Remove destination files first rm $JENAROOT/doc/ARQ/*.* cp doc/*.* $JENAROOT/doc/ARQ rm $JENAROOT/doc/ARQ/styles/*.* cp doc/styles/*.* $JENAROOT/doc/ARQ/styles rm $JENAROOT/doc/ARQ/Tutorial/*.* cp doc/Tutorial/*.* $JENAROOT/doc/ARQ/Tutorial ## # 4 -- Test suite ## ## copyDir testing/ARQ $JENAROOT/testing/ARQ ## copyDir testing/RDQL-ARQ $JENAROOT/testing/RDQL-ARQ ## copyDir testing/DAWG $JENAROOT/testing/DAWG ## copyDir testing/DAWG-Approved $JENAROOT/testing/DAWG-Approved # 5 -- Examples ## # Clean a directory - removes files - leaves CVS info intact ## function cleanDir ## { ## local DIR="$1" ## F="$(find $DIR -type f -and ! -path \*CVS/\* -and ! -name .cvsignore )" ## rm -f $F ## Not CVS ## } echo "Check to see if jena.jar is newer than the Jena distribution"