+++ /dev/null
-#!/bin/bash
-
-SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-
-JOB_NAME=${1}
-BUILD_NUMBER=${2}
-OUT_FILE=${3}
-
-BUILD_WORKSPACE=${SCRIPT_DIR}/../jobs/${JOB_NAME}/workspace
-
-export FINDBUGS_HOME=${SCRIPT_DIR}/../findbugs-3.0.1
-. ./setcp.sh
-
-rm cfb.fbp
-cat >cfb.fbp <<EOF
-<Project projectName="CFB">
- <Jar>${BUILD_WORKSPACE}/bin</Jar>
- <SrcDir>${BUILD_WORKSPACE}/src</SrcDir>
-</Project>
-EOF
-
-cat cfb.fbp
-./go.sh -c config.properties -d cfb -u cfb -p cfb -f cfb.fbp -n jenkins_${JOB_NAME}_${BUILD_NUMBER} -o ${OUT_FILE}
--- /dev/null
+#!/bin/bash
+
+set -o nounset ## (set -u) error exit on attempts to deref undefined variable
+set -o errexit ## (set -e) error exit if subcommand returns nonzero
+
+SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+
+OUT_FILE=${1}
+
+export FINDBUGS_HOME=${SCRIPT_DIR}/../findbugs-3.0.1
+. ${SCRIPT_DIR}/setcp.sh
+
+echo CLASSPATH=${CLASSPATH}
+echo FINDBUGS_HOME=${FINDBUGS_HOME}
+
+rm cfb.fbp
+cat >cfb.fbp <<EOF
+<Project projectName="CFB">
+ <Jar>${WORKSPACE}/bin</Jar>
+ <SrcDir>${WORKSPACE}/src</SrcDir>
+</Project>
+EOF
+
+cat cfb.fbp
+./go.sh -c ${SCRIPT_DIR}/config.properties -d cfb -u cfb -p cfb -f cfb.fbp -n jenkins_${JOB_NAME}_${BUILD_NUMBER} -o ${OUT_FILE}