diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2013-01-04 16:56:09 +0400 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2013-01-04 16:56:09 +0400 |
commit | 399f75eb8da238781767c24565ff07e2ec4b15fd (patch) | |
tree | 87e475b32eeced0fe1dac80b2a233450f4777c4a /uts | |
parent | 7603bb696b9a51529001c870e8da77428cdb02bc (diff) | |
download | illumos-packaging-399f75eb8da238781767c24565ff07e2ec4b15fd.tar.gz |
Substitute variables in whole line
Diffstat (limited to 'uts')
-rwxr-xr-x | uts/debian/drivers.pl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/uts/debian/drivers.pl b/uts/debian/drivers.pl index 38b9ad4..8c2bbf4 100755 --- a/uts/debian/drivers.pl +++ b/uts/debian/drivers.pl @@ -102,6 +102,9 @@ sub read_manifest($) { # http://stackoverflow.com/questions/12799907/how-to-read-multi-line-values-from-a-file-using-perl while (<$fd>) { + # Maybe multiline: + $_ .= <$fd> while s/\\\n// and not eof; + # Substitute variables: foreach my $k (keys %defs) { s/\Q$($k)\E/$defs{$k}/g; @@ -110,9 +113,7 @@ sub read_manifest($) { # Ignore comments: next if /^#/; - # Read driver specification, possibly multiline: if (/^driver/) { - $_ .= <$fd> while s/\\\n// and not eof; chomp; collect $_; } |