Commit 9622ce83 authored by Elijah Grubb's avatar Elijah Grubb

Update regex to support multilevels escapes

parent 341ef64a
...@@ -5146,7 +5146,7 @@ sub emulabizeImage($;$$$$$$$$$) ...@@ -5146,7 +5146,7 @@ sub emulabizeImage($;$$$$$$$$$)
# need to be careful about variables to be expanded # need to be careful about variables to be expanded
foreach my $elem (@$dockerentrypoint) { foreach my $elem (@$dockerentrypoint) {
print $runitfile "\""; print $runitfile "\"";
$elem =~ s/\"/\\\"/g; $elem =~ s/([^\\])(\\\\)*"/\1\2\\\"/g;
print $runitfile $elem; print $runitfile $elem;
print $runitfile "\""; print $runitfile "\"";
print $runitfile " "; print $runitfile " ";
...@@ -5158,7 +5158,7 @@ sub emulabizeImage($;$$$$$$$$$) ...@@ -5158,7 +5158,7 @@ sub emulabizeImage($;$$$$$$$$$)
foreach my $elem (@$dockercmd) { foreach my $elem (@$dockercmd) {
print $runitfile "\""; print $runitfile "\"";
$elem =~ s/\"/\\\"/g; $elem =~ s/([^\\])(\\\\)*"/\1\2\\\"/g;
print $runitfile $elem; print $runitfile $elem;
print $runitfile "\""; print $runitfile "\"";
print $runitfile " "; print $runitfile " ";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment