diff -ru pmd-3.7.orig/bin/build.xml pmd-3.7/bin/build.xml
--- pmd-3.7.orig/bin/build.xml 2006-09-25 01:17:08.000000000 +0200
+++ pmd-3.7/bin/build.xml 2006-09-25 01:29:36.000000000 +0200
@@ -12,12 +12,7 @@
-
-
-
-
-
-
+
@@ -62,7 +57,6 @@
-
diff -ru pmd-3.7.orig/bin/designer.sh pmd-3.7/bin/designer.sh
--- pmd-3.7.orig/bin/designer.sh 2006-09-25 01:17:08.000000000 +0200
+++ pmd-3.7/bin/designer.sh 2006-09-25 01:27:59.000000000 +0200
@@ -1,34 +1,11 @@
#!/bin/bash
-SCRIPT_DIR=`dirname $0`
-CWD="$PWD"
+cp=$(java-config -p xerces-2,saxpath,jaxen,pmd,xml-commons)
-cd "$SCRIPT_DIR/../lib"
-LIB_DIR=`pwd -P`
-
-classpath=$CLASSPATH
-
-build_dir="$SCRIPT_DIR/../build"
-
-if [ -d "$build_dir" ]; then
- cd "$build_dir"
- build_dir=`pwd -P`
- classpath=$classpath:$build_dir
-fi
-
-cd "$CWD"
-
-for jarfile in `ls $LIB_DIR/*.jar`; do
- classpath=$classpath:$jarfile
-done
-
-
-FILE=$1
+FILE=${1}
shift
-FORMAT=$1
+FORMAT=${1}
shift
-RULESETFILES="$@"
-
-# echo "CLASSPATH: $classpath"
+RULESETFILES="${@}"
-java -cp $classpath net.sourceforge.pmd.util.designer.Designer
+java -cp ${cp} net.sourceforge.pmd.util.designer.Designer
diff -ru pmd-3.7.orig/bin/pmd.sh pmd-3.7/bin/pmd.sh
--- pmd-3.7.orig/bin/pmd.sh 2006-09-25 01:17:08.000000000 +0200
+++ pmd-3.7/bin/pmd.sh 2006-09-25 01:27:44.000000000 +0200
@@ -1,41 +1,20 @@
#!/bin/bash
-if [ -z "$3" ]; then
- script=`basename $0`
+if [ -z "${3}" ]; then
+ script=$(basename $0)
echo "Usage:"
- echo " $script html|xml|text|vbhtml rulesetfile1[,rulesetfile2[,..]]"
+ echo " ${script} html|xml|text|vbhtml rulesetfile1[,rulesetfile2[,..]]"
exit 1
fi
-SCRIPT_DIR=`dirname $0`
-CWD="$PWD"
+cp=$(java-config -p xerces-2,saxpath,jaxen,pmd,xml-commons)
-cd "$SCRIPT_DIR/../lib"
-LIB_DIR=`pwd -P`
-
-classpath=$CLASSPATH
-
-build_dir="$SCRIPT_DIR/../build"
-
-if [ -d "$build_dir" ]; then
- cd "$build_dir"
- build_dir=`pwd -P`
- classpath=$classpath:$build_dir
-fi
-
-cd "$CWD"
-
-for jarfile in `ls $LIB_DIR/*.jar`; do
- classpath=$classpath:$jarfile
-done
-
-
-FILE=$1
+FILE=${1}
shift
-FORMAT=$1
+FORMAT=${1}
shift
-RULESETFILES="$@"
+RULESETFILES="${@}"
# echo "CLASSPATH: $classpath"
-java -cp $classpath net.sourceforge.pmd.PMD $FILE $FORMAT $RULESETFILES
+exec $(java-config --java) -cp ${cp} net.sourceforge.pmd.PMD ${FILE} ${FORMAT} ${RULESETFILES}