geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r600779 - /geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/SourceCommand.java
Date Tue, 04 Dec 2007 03:55:34 GMT
Author: jdillon
Date: Mon Dec  3 19:55:33 2007
New Revision: 600779

URL: http://svn.apache.org/viewvc?rev=600779&view=rev
Log:
(GSHELL-88) Ignore empty lines and # comments in source

Modified:
    geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/SourceCommand.java

Modified: geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/SourceCommand.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/SourceCommand.java?rev=600779&r1=600778&r2=600779&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/SourceCommand.java
(original)
+++ geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/SourceCommand.java
Mon Dec  3 19:55:33 2007
@@ -63,6 +63,13 @@
         try {
             String line;
             while ((line = reader.readLine()) != null) {
+                String tmp = line.trim();
+                
+                // Ignore empty lines and comments
+                if (tmp.length() == 0 || tmp.startsWith("#")) {
+                    continue;
+                }
+                
                 executor.execute(line);
             }
         }



Mime
View raw message