You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by jd...@apache.org on 2007/12/04 04:55:34 UTC
svn commit: r600779 -
/geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/SourceCommand.java
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);
}
}