mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-24 03:31:24 +02:00
Tiny optimization
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6964 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
f6f1b38194
commit
32ba2ce0b9
@ -835,8 +835,6 @@ sub read_a_line() {
|
||||
|
||||
while ( <$currentfile> ) {
|
||||
|
||||
$currentlinenumber++;
|
||||
|
||||
chomp;
|
||||
#
|
||||
# Continuation
|
||||
@ -850,11 +848,13 @@ sub read_a_line() {
|
||||
# Ignore ( concatenated ) Blank Lines
|
||||
#
|
||||
$currentline = '', next if $currentline =~ /^\s*$/;
|
||||
|
||||
$currentlinenumber = $.;
|
||||
#
|
||||
# Expand Shell Variables using %ENV
|
||||
#
|
||||
# $1 $2 $3 - $4
|
||||
while ( $currentline =~ m( ^(.*?) \$({)? ([a-zA-Z]\w*) (?(2)}) (.*)$)x ) {
|
||||
while ( $currentline =~ m( ^(.*?) \$({)? ([a-zA-Z]\w*) (?(2)}) (.*)$ )x ) {
|
||||
my $val = $ENV{$3};
|
||||
$val = '' unless defined $val;
|
||||
$currentline = join( '', $1 , $val , $4 );
|
||||
|
Loading…
x
Reference in New Issue
Block a user