Applied run.sh cleanup patch; thanks to Vadim Nasardinov

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@2237 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Tom Copeland
2003-09-04 14:43:47 +00:00
parent 7ece4f02a9
commit 0e6f36bd7f
2 changed files with 41 additions and 3 deletions

View File

@ -1,4 +1,41 @@
#!/bin/bash
if [ -z "$3" ]; then
script=`basename $0`
echo "Usage:"
echo " $script <java-src-file> html|xml rulesetfile1[,rulesetfile2[,..]]"
exit 1
fi
SCRIPT_DIR=`dirname $0`
CWD="$PWD"
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
FORMAT=$2
RULESETFILES=$3
java -cp ../lib/pmd-1.2.1.jar:../lib/jaxen-core-1.0-fcs.jar:../lib/saxpath-1.0-fcs.jar net.sourceforge.pmd.PMD $FILE $FORMAT $RULESETFILES
shift
FORMAT=$1
shift
RULESETFILES="$@"
# echo "CLASSPATH: $classpath"
java -cp $classpath net.sourceforge.pmd.PMD $FILE $FORMAT $RULESETFILES

View File

@ -38,6 +38,7 @@
</subsection>
<subsection name="Contributors">
<ul>
<li>Vadim Nasardinov - run.sh cleanup</li>
<li>Sreenivasa Viswanadha - grammar cleanup for Ctrl-Z problem</li>
<li>Sigiswald Madou - bug report</li>
<li>Dan Tullis - bug report</li>