summaryrefslogtreecommitdiff
path: root/lib/SlackBuild
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2018-04-13 10:53:52 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2018-04-13 10:53:52 +0200
commit3abdf5f6bc073fb8120d9938d3e76da329662845 (patch)
tree996c3182b8e387fb62688d0358f9c95329f5a580 /lib/SlackBuild
parentc7377b5c67997f3c75d3fe3dc115bfd70fffe4e9 (diff)
downloadslackbuilder-3abdf5f6bc073fb8120d9938d3e76da329662845.tar.gz
slackbuilder-3abdf5f6bc073fb8120d9938d3e76da329662845.tar.bz2
Improve info file parser
* lib/SlackBuild/Info.pm (new): Support line continuations.
Diffstat (limited to 'lib/SlackBuild')
-rw-r--r--lib/SlackBuild/Info.pm5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/SlackBuild/Info.pm b/lib/SlackBuild/Info.pm
index 251e9e4..796643b 100644
--- a/lib/SlackBuild/Info.pm
+++ b/lib/SlackBuild/Info.pm
@@ -68,6 +68,11 @@ sub new {
}
while (<$fd>) {
chomp;
+ if (/\\$/) {
+ chop;
+ $_ .= <$fd>;
+ redo;
+ }
s/^\s+//;
next if /^(#.*)?$/;
return unless /^(?<kw>[A-Za-z_][A-Za-z_0-9]*)="(?<val>.*)"$/;

Return to:

Send suggestions and report system problems to the System administrator.