Return-Path: Delivered-To: apmail-geronimo-scm-archive@www.apache.org Received: (qmail 18777 invoked from network); 4 Dec 2007 03:56:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Dec 2007 03:56:01 -0000 Received: (qmail 46538 invoked by uid 500); 4 Dec 2007 03:55:49 -0000 Delivered-To: apmail-geronimo-scm-archive@geronimo.apache.org Received: (qmail 46483 invoked by uid 500); 4 Dec 2007 03:55:49 -0000 Mailing-List: contact scm-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list scm@geronimo.apache.org Received: (qmail 46472 invoked by uid 99); 4 Dec 2007 03:55:49 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Dec 2007 19:55:49 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Dec 2007 03:55:58 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 5C2841A9832; Mon, 3 Dec 2007 19:55:34 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: scm@geronimo.apache.org From: jdillon@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20071204035534.5C2841A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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); } }