Created
April 17, 2014 13:24
-
-
Save dirkk/10983184 to your computer and use it in GitHub Desktop.
Saxon bash script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
SAXON="/opt/saxon" | |
# Core and library classes | |
# CP="$SAXON/saxon9he.jar" | |
CP="$CP$(for JAR in "$SAXON"/*.jar; do echo -n ":$JAR"; done)" | |
# Options for virtual machine | |
VM=-Xmx512m | |
general_args=( ) | |
vm_args=( ) | |
while (( $# )) ; do | |
if [[ $1 = "-X" ]] ; then | |
vm_args+=( "$2" ) | |
shift 2 | |
else | |
general_args+=( "$1" ) | |
shift | |
fi | |
done | |
# Run code | |
java -cp "$CP" $VM "${vm_args[@]}" net.sf.saxon.Query "${general_args[@]}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment