summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorrillig <rillig>2005-09-04 00:26:13 +0000
committerrillig <rillig>2005-09-04 00:26:13 +0000
commit378f20cd88cae73b1bca6fb4fe65419bfb0cbb3c (patch)
tree533b76f568e8c076b2774c0762edf6947e87a837 /pkgtools
parent9af8b9ca2b9612a23b3d4276609466415af6804e (diff)
downloadpkgsrc-378f20cd88cae73b1bca6fb4fe65419bfb0cbb3c.tar.gz
Made the code in get_logical_line easier.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkglint/files/pkglint.pl11
1 files changed, 8 insertions, 3 deletions
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl
index f7043dde2c1..1148ae0c47b 100644
--- a/pkgtools/pkglint/files/pkglint.pl
+++ b/pkgtools/pkglint/files/pkglint.pl
@@ -11,7 +11,7 @@
# Freely redistributable. Absolutely no warranty.
#
# From Id: portlint.pl,v 1.64 1998/02/28 02:34:05 itojun Exp
-# $NetBSD: pkglint.pl,v 1.275 2005/09/03 22:23:46 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.276 2005/09/04 00:26:13 rillig Exp $
#
# This version contains lots of changes necessary for NetBSD packages
# done by:
@@ -525,13 +525,18 @@ sub get_logical_line($$) {
if ($lines->[$lineno]->text =~ qr"^(\s*)(.*?)\s*(\\?)$") {
my ($indent, $text, $cont) = ($1, $2, $3);
- $value .= $first ? "$indent$text" : $text;
+ if ($first) {
+ $value .= $indent;
+ $first = false;
+ }
+
+ $value .= $text;
+
if ($cont eq "\\") {
$value .= " ";
} else {
last;
}
- $first = false;
}
}
${$ref_lineno} = $lineno + 1;