Skip to content

Instantly share code, notes, and snippets.

@mistydemeo
Created October 25, 2012 22:38
Show Gist options
  • Save mistydemeo/3955919 to your computer and use it in GitHub Desktop.
Save mistydemeo/3955919 to your computer and use it in GitHub Desktop.
Running FITs in nailgun

This assumes a brew install of FITS and nailgun.

  • Drop the hacked-up fits-ng.sh below into your brew --prefix nailgun
  • ./fits-ng.sh
  • (in any directory now) ng edu.harvard.hul.ois.fits.Fits -h
#!/bin/bash
FITS_HOME=`brew --prefix fits`
export FITS_HOME
JCPATH=${FITS_HOME}/libexec
# Add on extra jar files to APPCLASSPATH
for i in "$JCPATH"/*.jar; do
APPCLASSPATH="$APPCLASSPATH":"$i"
done
JCPATH=${FITS_HOME}/libexec/droid
# Add on extra jar files to APPCLASSPATH
for i in "$JCPATH"/*.jar; do
APPCLASSPATH="$APPCLASSPATH":"$i"
done
JCPATH=${FITS_HOME}/libexec/jhove
# Add on extra jar files to APPCLASSPATH
for i in "$JCPATH"/*.jar; do
APPCLASSPATH="$APPCLASSPATH":"$i"
done
JCPATH=${FITS_HOME}/libexec/nzmetool
# Add on extra jar files to APPCLASSPATH
for i in "$JCPATH"/*.jar; do
APPCLASSPATH="$APPCLASSPATH":"$i"
done
JCPATH=${FITS_HOME}/libexec/nzmetool/adapters
# Add on extra jar files to APPCLASSPATH
for i in "$JCPATH"/*.jar; do
APPCLASSPATH="$APPCLASSPATH":"$i"
done
APPCLASSPATH="$APPCLASSPATH":"$FITS_HOME/xml/nlnz"
export CLASSPATH=$APPCLASSPATH:"$PWD/nailgun-0.7.1.jar"
eval "exec java -classpath \"$CLASSPATH\" -server com.martiansoftware.nailgun.NGServer"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment