build: make zoneinfo2lua.pl script more convenient
authorJo-Philipp Wich <jow@openwrt.org>
Sun, 2 Jan 2011 17:29:19 +0000 (17:29 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sun, 2 Jan 2011 17:29:19 +0000 (17:29 +0000)
build/zoneinfo2lua.pl [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 7e772c0..2e24c95
@@ -6,6 +6,9 @@
 use strict;
 
 my %TZ;
 use strict;
 
 my %TZ;
+my $tzdir = $ARGV[0] || "/usr/share/zoneinfo";
+
+chdir($tzdir) || die "chdir($tzdir): $!\n";
 
 local $/ = "\012";
 open( ZTAB, "< ./zone.tab" ) || die "Unable to open zone.tab: $!";
 
 local $/ = "\012";
 open( ZTAB, "< ./zone.tab" ) || die "Unable to open zone.tab: $!";