#!/bin/sh function prefix { typeset path path=`pwd` expr $path : '\(.*\)src/org/apache/fop/.*' } #set -x compiler="jikes" until case "$1" in -j) compiler=javac echo Using javac false ;; -g) debug="-g" echo Debugging on false ;; esac do shift done $compiler $debug -verbose -d `prefix`build/classes -sourcepath `prefix`src "$@"