From 86595977d761baa67c1462efd59a6404b56205ad Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Sun, 24 Sep 2017 12:04:42 -0700 Subject: tz: Write tzdata hash script in lua This should make it easier to support the users `config.fs`. --- pkg/tz/tzdata.awk | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 pkg/tz/tzdata.awk (limited to 'pkg/tz/tzdata.awk') diff --git a/pkg/tz/tzdata.awk b/pkg/tz/tzdata.awk deleted file mode 100644 index e7b48085..00000000 --- a/pkg/tz/tzdata.awk +++ /dev/null @@ -1,26 +0,0 @@ -# usage: awk -f tzdata.awk repo=out/root.git out=out/pkg/tz/zoneinfo [file...] - -function run(cmd) { - status = system(cmd) - if (status != 0) - exit status -} - -BEGIN { - cmdfmt = "rc ./scripts/hash.rc %s %s share/zoneinfo/%s %s" -} - -FNR == 1 { - run(sprintf("zic -d %s %s", out, FILENAME)) -} - -$1 == "Link" { - s = $3 - gsub(/[^\/]+/, "..", s) - s = substr(s, 1, length(s) - 2) $2 - run(sprintf(cmdfmt, repo, 120000, $3, s)) -} - -$1 == "Zone" { - run(sprintf(cmdfmt, repo, 100644, $2, out "/" $2)) -} -- cgit v1.2.3