[X2Go-Commits] x2goserver.git - build-baikal (branch) updated: 3.1.1.3-82-g1ba01e9

X2Go dev team git-admin at x2go.org
Fri Jan 3 18:05:01 CET 2014


The branch, build-baikal has been updated
       via  1ba01e9334189f80f706d9e1eb058d5bdd394ecf (commit)
      from  bbef4622482874742354e906ecb44b4191d3a3ff (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
-----------------------------------------------------------------------

Summary of changes:
 X2Go/Utils.pm |   31 ++++++++++++++++++-------------
 1 file changed, 18 insertions(+), 13 deletions(-)

The diff of changes is:
diff --git a/X2Go/Utils.pm b/X2Go/Utils.pm
index 18442a8..23a13b3 100644
--- a/X2Go/Utils.pm
+++ b/X2Go/Utils.pm
@@ -38,19 +38,24 @@ use base 'Exporter';
 our @EXPORT = ('source_environment');
 
 sub source_environment {
-    my $name = shift;
-
-    open my $fh, "<", $name
-        or die "could not open $name: $!";
-
-    while (<$fh>) {
-        chomp;
-        my ($k, $v) = split /=/, $_, 2;
-        $v =~ s/^(['"])(.*)\1/$2/; #' fix highlighter
-        $v =~ s/\$([a-zA-Z]\w*)/$ENV{$1}/g;
-        $v =~ s/`(.*?)`/`$1`/ge; #dangerous
-        $ENV{$k} = $v;
-    }
+	my $name = shift;
+
+	open my $fh, "<", $name
+	     or die "could not open $name: $!";
+
+	while (<$fh>) {
+		chomp;
+		my $line = $_;
+		if ( $line =~ m/^#.*/ )
+		{
+			next;
+		}
+		my ($k, $v) = split /=/, $line, 2;
+		$v =~ s/^(['"])(.*)\1/$2/; #' fix highlighter
+		$v =~ s/\$([a-zA-Z]\w*)/$ENV{$1}/g;
+		$v =~ s/`(.*?)`/`$1`/ge; #dangerous
+		$ENV{$k} = $v;
+	}
 }
 
 1;


hooks/post-receive
-- 
x2goserver.git (X2Go Server)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "x2goserver.git" (X2Go Server).




More information about the x2go-commits mailing list