#!/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 ; # Add -name ".svn" -prune -or for CVS find . \ -name .\?\?\* -prune -or \ -print | cpio -p "$DST" ) } ## # 1 -- jars files ## ## cp -f lib/arq.jar $JENAROOT/lib ## # No longer in the Jena distribution - Jena doc points to the web. ## # 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 ## # No longer in the Jena distribution - Jena doc points to the web. ## # 3 -- Documentation (avoid CVS/SVN 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 echo "Also run testing/exportToJena" ## ## 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 copyDir src-examples/arq $JENAROOT/src-examples/arq ## # 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 ## } # 6 -- bin and bat cp bin/{arq,arq_path,make_classpath,arq_version,qexpr,qparse,qtest,query,sparql,rset,update} $JENAROOT/bin cp bat/*.bat $JENAROOT/bat ## echo "Check to see if jena.jar is newer than the Jena distribution"