#!/usr/bin/perl
# zoneinfo2lua.pl - Make Lua module from /usr/share/zoneinfo
-# Execute from within /usr/share/zoneinfo
+# Execute from within root of Luci feed, usually feeds/luci
# $Id$
use strict;
my %TZ;
my $tzdin = $ARGV[0] || "/usr/share/zoneinfo";
-my $tzdout = $ARGV[1] || "./libs/sys/luasrc/sys/zoneinfo";
+my $tzdout = $ARGV[1] || "./modules/base/luasrc/sys/zoneinfo";
local $/ = "\012";
open( ZTAB, "< $tzdin/zone.tab" ) || die "open($tzdin/zone.tab): $!";
print STDERR "Writing time zones to $tzdout/tzdata.lua ... ";
print O <<HEAD;
---[[
-LuCI - Autogenerated Zoneinfo Module
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-]]--
+-- Licensed to the public under the Apache License 2.0.
module "luci.sys.zoneinfo.tzdata"
print STDERR "Writing time offsets to $tzdout/tzoffset.lua ... ";
print O <<HEAD;
---[[
-LuCI - Autogenerated Zoneinfo Module
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-]]--
+-- Licensed to the public under the Apache License 2.0.
module "luci.sys.zoneinfo.tzoffset"