mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-30 05:56:12 +00:00
reformat with perltidy standard
This commit is contained in:
parent
6073d3b139
commit
d20eb25772
@ -18,14 +18,14 @@ my $res = GetOptions(
|
||||
"output" => \$output
|
||||
);
|
||||
if ( !$res || $help ) {
|
||||
print "$0 [--base=/usr/share/zoneinfo] [--output=timezones.conf.xml] [--debug] [--help]\n";
|
||||
print
|
||||
"$0 [--base=/usr/share/zoneinfo] [--output=timezones.conf.xml] [--debug] [--help]\n";
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
my @dirs = ($base);
|
||||
|
||||
while ( @dirs )
|
||||
{
|
||||
while (@dirs) {
|
||||
my $dir = shift @dirs;
|
||||
|
||||
opendir( my $top, $dir );
|
||||
@ -42,7 +42,7 @@ while ( @dirs )
|
||||
}
|
||||
elsif ( -d "$dir/$file" ) {
|
||||
$debug && print "Found subdir $dir/$file\n";
|
||||
push(@dirs, "$dir/$file");
|
||||
push( @dirs, "$dir/$file" );
|
||||
}
|
||||
}
|
||||
closedir($top);
|
||||
@ -66,10 +66,11 @@ foreach my $name ( sort( keys(%name_to_file) ) ) {
|
||||
$tmp =~ s/.*\n//sgmo;
|
||||
|
||||
$zones{$name} = $tmp;
|
||||
}
|
||||
}
|
||||
|
||||
open( my $out, ">$output" );
|
||||
print $out "<configuration name=\"timezones.conf\" description=\"Timezones\">\n";
|
||||
print $out
|
||||
"<configuration name=\"timezones.conf\" description=\"Timezones\">\n";
|
||||
print $out " " x 4, "<timezones>\n";
|
||||
|
||||
my $lastprefix = "";
|
||||
@ -85,7 +86,7 @@ foreach my $zone ( sort( keys(%zones) ) ) {
|
||||
$lastprefix = $newprefix;
|
||||
|
||||
print $out "\t<zone name=\"$zone\" value=\"$str\" />\n";
|
||||
}
|
||||
}
|
||||
print $out " " x 4, "</timezones>\n";
|
||||
print $out "</configuration>\n";
|
||||
close($out);
|
||||
|
Loading…
x
Reference in New Issue
Block a user