incubator-connectors-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r938269 - /incubator/lcf/trunk/modules/framework/scripts/executecommand.sh
Date Mon, 26 Apr 2010 23:35:53 GMT
Author: kwright
Date: Mon Apr 26 23:35:53 2010
New Revision: 938269

URL: http://svn.apache.org/viewvc?rev=938269&view=rev
Log:
Correct problems found by a user when they tried to kick this script off.

Modified:
    incubator/lcf/trunk/modules/framework/scripts/executecommand.sh

Modified: incubator/lcf/trunk/modules/framework/scripts/executecommand.sh
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/scripts/executecommand.sh?rev=938269&r1=938268&r2=938269&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/scripts/executecommand.sh (original)
+++ incubator/lcf/trunk/modules/framework/scripts/executecommand.sh Mon Apr 26 23:35:53 2010
@@ -1,8 +1,8 @@
 #!/bin/bash -e
 
 #Make sure environment variables are properly set
-if [ -e $JAVA_HOME/bin/java ] ; then
-    if [ -f $LCF_HOME/properties.ini ] ; then
+if [ -e "$JAVA_HOME"/bin/java ] ; then
+    if [ -f "$LCF_HOME"/properties.ini ] ; then
     
         # Build the classpath
         CLASSPATH=""
@@ -16,10 +16,12 @@ if [ -e $JAVA_HOME/bin/java ] ; then
         
         # Build the defines
         DEFINES=""
-        for filename in $(ls -1 "$LCF_HOME/processes/define") ; do
-            DEFINEVAR=-D"$filename"=$(cat "$LCF_HOME/processes/define/"$filename")
-            DEFINES="$DEFINES $DEFINEVAR"
-        done
+        if [ -e "$LCF_HOME/processes/define" ] ; then
+            for filename in $(ls -1 "$LCF_HOME/processes/define") ; do
+                DEFINEVAR=-D"$filename"=$(cat "$LCF_HOME/processes/define/"$filename")
+                DEFINES="$DEFINES $DEFINEVAR"
+            done
+        fi
         
         "$JAVA_HOME/bin/java" "$DEFINES" --classpath "$CLASSPATH" "$@"
         exit $?



Mime
View raw message