-
-
Save bdarcus/6accbfc7fb60481cf5b60bcab24ad333 to your computer and use it in GitHub Desktop.
Saxon bash script
This file contains 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