mirror of
https://git.freebsd.org/ports.git
synced 2025-06-03 11:56:28 -04:00
remove the first comment lines in a section properly.
This commit is contained in:
parent
e6e0087938
commit
bd430b955e
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=18069
2 changed files with 6 additions and 2 deletions
|
@ -13,7 +13,7 @@
|
|||
# bsd.port.mk. There are significant differences in those so you'll have
|
||||
# hard time upgrading this...
|
||||
#
|
||||
# $Id: portlint.pl,v 1.4 1999/04/02 03:24:13 steve Exp $
|
||||
# $Id: portlint.pl,v 1.5 1999/04/04 21:35:10 steve Exp $
|
||||
#
|
||||
|
||||
$err = $warn = 0;
|
||||
|
@ -654,9 +654,11 @@ EOF
|
|||
# for the rest of the checks, comment lines are not important.
|
||||
#
|
||||
for ($i = 0; $i < scalar(@sections); $i++) {
|
||||
$sections[$i] = "\n" . $sections[$i];
|
||||
$sections[$i] =~ s/\n#[^\n]*//g;
|
||||
$sections[$i] =~ s/\n\n+/\n/g;
|
||||
$sections[$i] =~ s/\\\n/ /g;
|
||||
$sections[$i] =~ s/^\n//;
|
||||
}
|
||||
|
||||
#
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
# bsd.port.mk. There are significant differences in those so you'll have
|
||||
# hard time upgrading this...
|
||||
#
|
||||
# $Id: portlint.pl,v 1.4 1999/04/02 03:24:13 steve Exp $
|
||||
# $Id: portlint.pl,v 1.5 1999/04/04 21:35:10 steve Exp $
|
||||
#
|
||||
|
||||
$err = $warn = 0;
|
||||
|
@ -654,9 +654,11 @@ EOF
|
|||
# for the rest of the checks, comment lines are not important.
|
||||
#
|
||||
for ($i = 0; $i < scalar(@sections); $i++) {
|
||||
$sections[$i] = "\n" . $sections[$i];
|
||||
$sections[$i] =~ s/\n#[^\n]*//g;
|
||||
$sections[$i] =~ s/\n\n+/\n/g;
|
||||
$sections[$i] =~ s/\\\n/ /g;
|
||||
$sections[$i] =~ s/^\n//;
|
||||
}
|
||||
|
||||
#
|
||||
|
|
Loading…
Add table
Reference in a new issue