1 #! /bin/sh 2 3 # Deprecated 4 5 # Create the union of two results files, preserving 6 # annotations in both files in the result. 7 8 program="$0" 9 10 # Follow symlinks until we get to the actual file. 11 while [ -h "$program" ]; do 12 link=`ls -ld "$program"` 13 link=`expr "$link" : '.*-> \(.*\)'` 14 if [ "`expr "$link" : '/.*'`" = 0 ]; then 15 # Relative 16 dir=`dirname "$program"` 17 program="$dir/$link" 18 else 19 # Absolute 20 program="$link" 21 fi 22 done 23 24 # Assume findbugs home directory is the parent 25 # of the directory containing the script (which should 26 # normally be "$findbugs_home/bin"). 27 dir=`dirname "$program"` 28 findbugs_home="$dir/.." 29 30 # Handle FHS-compliant installations (e.g., Fink) 31 if [ -d "$findbugs_home/share/findbugs" ]; then 32 findbugs_home="$findbugs_home/share/findbugs" 33 fi 34 35 # Make absolute 36 findbugs_home=`cd "$findbugs_home" && pwd` 37 38 fb_pathsep=':' 39 40 # Handle cygwin, courtesy of Peter D. Stout 41 fb_osname=`uname` 42 if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then 43 findbugs_home=`cygpath --mixed "$findbugs_home"` 44 fb_pathsep=';' 45 fi 46 # Handle MKS, courtesy of Kelly O'Hair 47 if [ "${fb_osname}" = "Windows_NT" ]; then 48 fb_pathsep=';' 49 fi 50 51 if [ ! -d "$findbugs_home" ]; then 52 echo "The path $findbugs_home," 53 echo "which is where I think FindBugs is located," 54 echo "does not seem to be a directory." 55 exit 1 56 fi 57 58 # Choose default java binary 59 fb_javacmd=java 60 if [ ! -z "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then 61 if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then 62 fb_javacmd=`cygpath --mixed "$JAVA_HOME"`/bin/java 63 else 64 fb_javacmd="$JAVA_HOME/bin/java" 65 fi 66 fi 67 68 fb_mainclass=edu.umd.cs.findbugs.workflow.UnionResults 69 70 fb_javacmd=${fb_javacmd:-"java"} 71 fb_maxheap=${fb_maxheap:-"-Xmx768m"} 72 fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"} 73 set -f 74 #echo command: \ 75 exec "$fb_javacmd" \ 76 -classpath "$fb_appjar$fb_pathsep$CLASSPATH" \ 77 -Dfindbugs.home="$findbugs_home"\ 78 $fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs 79 80 # vim:ts=3 81