diff --git a/sandbox/repoclean/src/main/bash/repoclean.sh b/sandbox/repoclean/src/main/bash/repoclean.sh index 46f465aec2..fc9398fcca 100644 --- a/sandbox/repoclean/src/main/bash/repoclean.sh +++ b/sandbox/repoclean/src/main/bash/repoclean.sh @@ -1,11 +1,26 @@ #!/bin/bash -CP=./lib/repoclean-1.0-SNAPSHOT.jar +mypath=`which $0` + +echo "mypath: $mypath" + +mydir=`pwd` + +if [ "" != "$mypath" ]; then + + echo "Setting mydir based on mypath..." + mydir=`dirname $mypath` + +fi + +echo "mydir: $mydir" + +CP=$mydir/lib/repoclean-1.0-SNAPSHOT.jar for lib in `ls -1 ./lib | grep -v 'repoclean'` do - CP=$CP:./lib/$lib + CP=$CP:$mydir/lib/$lib done @@ -29,5 +44,6 @@ fi if [ -z "$JAVA_HOME" ]; then JAVA_HOME=/usr/local/java +fi nice -n 19 $JAVA_HOME/bin/java -Xmx128M -Xms64M -Xincgc $JAVA_OPTS -classpath ${CP} org.apache.maven.tools.repoclean.Main $* | tee repoclean-log.txt