summaryrefslogtreecommitdiffstats
path: root/lib/MDK
diff options
context:
space:
mode:
Diffstat (limited to 'lib/MDK')
-rw-r--r--lib/MDK/Common.pm.pl2
-rw-r--r--lib/MDK/Common/System.pm7
2 files changed, 7 insertions, 2 deletions
diff --git a/lib/MDK/Common.pm.pl b/lib/MDK/Common.pm.pl
index 5f53635..51090c5 100644
--- a/lib/MDK/Common.pm.pl
+++ b/lib/MDK/Common.pm.pl
@@ -73,7 +73,7 @@ our @ISA = qw(Exporter);
# perl_checker: RE-EXPORT-ALL
our @EXPORT = map { @$_ } map { values %{'MDK::Common::' . $_ . 'EXPORT_TAGS'} } grep { /::$/ } keys %MDK::Common::;
-our $VERSION = "1.2.17";
+our $VERSION = "1.2.18";
1;
EOF
diff --git a/lib/MDK/Common/System.pm b/lib/MDK/Common/System.pm
index 900f6aa..7ff4e4c 100644
--- a/lib/MDK/Common/System.pm
+++ b/lib/MDK/Common/System.pm
@@ -341,7 +341,12 @@ sub getVarsFromSh {
s/#.*//; # remove comments
s/^\s*//; # leading space
my ($v, $val) = /^(\w+)=(.*)/ or next;
- $val = $1 if $val =~ /^"(.*)"$/ || $val =~ /^'(.*)'$/;
+ if ($val =~ /^"(.*)"$/) {
+ $val = $1;
+ } elsif ($val =~ /^'(.*)'$/) {
+ $val = $1;
+ $val =~ s/(^|[^'])'\\''/$1'/g;
+ }
$l{$v} = $val;
}
%l;