mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-20 01:37:59 +02:00
Avoid dropping first line of library source text
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
2d458b46b4
commit
88447bfc7d
@ -1208,13 +1208,11 @@ sub copy2( $ ) {
|
|||||||
|
|
||||||
if ( $script ) {
|
if ( $script ) {
|
||||||
my $file = $_[0];
|
my $file = $_[0];
|
||||||
my $first = 1;
|
|
||||||
|
|
||||||
open IF , $file or fatal_error "Unable to open $file: $!";
|
open IF , $file or fatal_error "Unable to open $file: $!";
|
||||||
|
|
||||||
while ( <IF> ) {
|
while ( <IF> ) {
|
||||||
last unless /^#/;
|
last unless /^#/;
|
||||||
$first = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
print $script <<EOF;
|
print $script <<EOF;
|
||||||
@ -1223,7 +1221,7 @@ sub copy2( $ ) {
|
|||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
print $script $_ if $first;
|
print $script $_ unless /^\s*$/;
|
||||||
|
|
||||||
while ( <IF> ) {
|
while ( <IF> ) {
|
||||||
chomp;
|
chomp;
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#
|
#
|
||||||
# This library contains the wrapper code for running a generated script.
|
# This library contains the wrapper code for running a generated script.
|
||||||
#
|
#
|
||||||
|
|
||||||
#
|
#
|
||||||
# Get the Shorewall version of the passed script
|
# Get the Shorewall version of the passed script
|
||||||
#
|
#
|
||||||
|
Loading…
x
Reference in New Issue
Block a user