maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aherit...@apache.org
Subject svn commit: r727842 - in /maven/sandbox/trunk/reports: maven-plugins-fixed.sh maven-plugins.sh maven.sh
Date Thu, 18 Dec 2008 22:23:17 GMT
Author: aheritier
Date: Thu Dec 18 14:23:16 2008
New Revision: 727842

URL: http://svn.apache.org/viewvc?rev=727842&view=rev
Log:
Improve script to handle command line args
JAVA_HOME has to be set

Modified:
    maven/sandbox/trunk/reports/maven-plugins-fixed.sh
    maven/sandbox/trunk/reports/maven-plugins.sh
    maven/sandbox/trunk/reports/maven.sh

Modified: maven/sandbox/trunk/reports/maven-plugins-fixed.sh
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/reports/maven-plugins-fixed.sh?rev=727842&r1=727841&r2=727842&view=diff
==============================================================================
--- maven/sandbox/trunk/reports/maven-plugins-fixed.sh (original)
+++ maven/sandbox/trunk/reports/maven-plugins-fixed.sh Thu Dec 18 14:23:16 2008
@@ -1,9 +1,31 @@
 #!/bin/sh
 
-export JAVA_HOME=/opt/java/sdk/current
+if [ $JAVA_HOME ]
+then
+    echo "The script will use \$JAVA_HOME = $JAVA_HOME"
+else
+    echo "\$JAVA_HOME must be defined to launch the script."
+    exit 1
+fi
+
+if [ $# -ne 1 ]
+then
+    echo "Usage - $0 output-directory"
+    exit 1
+fi
+
+if [ -d $1 ]
+then
+    export OUTPUTDIR=$1
+else
+    echo "Sorry, $1 directory does not exist"
+fi
+
 export JAVA_CMD=$JAVA_HOME/bin/java
 export JAVA_OPTS="-ms32m -mx256m"
 export JAVA="$JAVA_CMD $JAVA_OPTS"
 
-$JAVA -jar swizzle-jirareport-1.2.3-SNAPSHOT-dep.jar maven-plugins-fixed.vm > $1/maven-plugins-fixed.txt
-$JAVA -jar swizzle-jirareport-1.2.3-SNAPSHOT-dep.jar maven-plugins-fixed-html.vm > $1/maven-plugins-fixed.html
+$CMD maven-plugins-fixed.vm > $OUTPUTDIR/maven-plugins-fixed.txt
+$CMD maven-plugins-fixed-html.vm > $OUTPUTDIR/maven-plugins-fixed.html
+
+exit 0
\ No newline at end of file

Modified: maven/sandbox/trunk/reports/maven-plugins.sh
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/reports/maven-plugins.sh?rev=727842&r1=727841&r2=727842&view=diff
==============================================================================
--- maven/sandbox/trunk/reports/maven-plugins.sh (original)
+++ maven/sandbox/trunk/reports/maven-plugins.sh Thu Dec 18 14:23:16 2008
@@ -1,9 +1,31 @@
 #!/bin/sh
 
-export JAVA_HOME=/opt/java/sdk/current                                                  
                                                                       
+if [ $JAVA_HOME ]
+then
+    echo "The script will use \$JAVA_HOME = $JAVA_HOME"
+else
+    echo "\$JAVA_HOME must be defined to launch the script."
+    exit 1
+fi
+
+if [ $# -ne 1 ]
+then
+    echo "Usage - $0 output-directory"
+    exit 1
+fi
+
+if [ -d $1 ]
+then
+    export OUTPUTDIR=$1
+else
+    echo "Sorry, $1 directory does not exist"
+fi
+
 export JAVA_CMD=$JAVA_HOME/bin/java                                                     
                                                                       
 export JAVA_OPTS="-ms32m -mx256m"                                                       
                                                                       
 export JAVA="$JAVA_CMD $JAVA_OPTS"           
 
-$JAVA -jar swizzle-jirareport-1.2.3-SNAPSHOT-dep.jar maven-plugins.vm > $1/plugin-votes.txt
-$JAVA -jar swizzle-jirareport-1.2.3-SNAPSHOT-dep.jar maven-plugins-html.vm > $1/plugin-votes.html
+$CMD maven-plugins.vm > $OUTPUTDIR/plugin-votes.txt
+$CMD maven-plugins-html.vm > $OUTPUTDIR/plugin-votes.html
+
+exit 0
\ No newline at end of file

Modified: maven/sandbox/trunk/reports/maven.sh
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/reports/maven.sh?rev=727842&r1=727841&r2=727842&view=diff
==============================================================================
--- maven/sandbox/trunk/reports/maven.sh (original)
+++ maven/sandbox/trunk/reports/maven.sh Thu Dec 18 14:23:16 2008
@@ -23,9 +23,9 @@
 
 export JAVA_CMD=$JAVA_HOME/bin/java
 export JAVA_OPTS="-ms32m -mx256m"
-export JAVA="$JAVA_CMD $JAVA_OPTS"
+export CMD="$JAVA_CMD $JAVA_OPTS -jar swizzle-jirareport-1.2.3-SNAPSHOT-dep.jar"
 
-$JAVA -jar swizzle-jirareport-1.2.3-SNAPSHOT-dep.jar maven.vm -DentityExpansionLimit=500000
> $OUTPUTDIR/maven-votes.txt
-$JAVA -jar swizzle-jirareport-1.2.3-SNAPSHOT-dep.jar maven-html.vm -DentityExpansionLimit=500000
> $OUTPUTDIR/maven-votes.html
+$CMD maven.vm -DentityExpansionLimit=500000 > $OUTPUTDIR/maven-votes.txt
+$CMD maven-html.vm -DentityExpansionLimit=500000 > $OUTPUTDIR/maven-votes.html
 
 exit 0
\ No newline at end of file



Mime
View raw message