summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2011-01-02 17:29:19 +0000
committerJo-Philipp Wich <jow@openwrt.org>2011-01-02 17:29:19 +0000
commitc8bac066234103a6fd87c4d32f08fd1622be5ba3 (patch)
tree004a11ed160fba544c50b0ac71e678f6a4d2f141
parentd9736ece54d502709a06b759bcdbebe9af56b4ef (diff)
build: make zoneinfo2lua.pl script more convenient
-rwxr-xr-x[-rw-r--r--]build/zoneinfo2lua.pl3
1 files changed, 3 insertions, 0 deletions
diff --git a/build/zoneinfo2lua.pl b/build/zoneinfo2lua.pl
index 7e772c0af..2e24c9541 100644..100755
--- a/build/zoneinfo2lua.pl
+++ b/build/zoneinfo2lua.pl
@@ -6,6 +6,9 @@
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: $!";