mirror of
https://gitlab.com/shorewall/code.git
synced 2025-01-15 01:58:48 +01:00
Make buildports.pl a little more bulletproof
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6637 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
60857f0518
commit
a649be0f53
@ -41,10 +41,12 @@ sub print_it( $$ ) {
|
||||
my $length = length $name;
|
||||
|
||||
if ( $name =~ /\W/ || $name =~ /^\d/ ) {
|
||||
$tabs = "\t" x int ( ( 27 - $length ) / 8 );
|
||||
my $repeat = int ( ( 27 - $length ) / 8 );
|
||||
$tabs = $repeat > 0 ? "\t" x $repeat : ' ';
|
||||
print "${offset}'${name}'${tabs}=> $number,\n";
|
||||
} else {
|
||||
$tabs = "\t" x int ( ( 29 - $length ) / 8 );
|
||||
my $repeat = int ( ( 29 - $length ) / 8 );
|
||||
$tabs = $repeat > 0 ? "\t" x $repeat : ' ';
|
||||
print "${offset}${name}${tabs}=> $number,\n";
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user