]> gitweb.factorcode.org Git - factor.git/commitdiff
zoneinfo.update: add a vocabulary to automatically update the zoneinfo files from...
authorDoug Coleman <doug.coleman@gmail.com>
Sat, 13 May 2023 02:47:23 +0000 (21:47 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Sat, 13 May 2023 03:31:06 +0000 (22:31 -0500)
extra/zoneinfo/update/authors.txt [new file with mode: 0644]
extra/zoneinfo/update/update.factor [new file with mode: 0644]

diff --git a/extra/zoneinfo/update/authors.txt b/extra/zoneinfo/update/authors.txt
new file mode 100644 (file)
index 0000000..7c1b2f2
--- /dev/null
@@ -0,0 +1 @@
+Doug Coleman
diff --git a/extra/zoneinfo/update/update.factor b/extra/zoneinfo/update/update.factor
new file mode 100644 (file)
index 0000000..634b963
--- /dev/null
@@ -0,0 +1,32 @@
+! Copyright (C) 2023 Doug Coleman.
+! See https://factorcode.org/license.txt for BSD license.
+USING: build-from-source cli.git io.launcher kernel sequences
+sorting ;
+IN: zoneinfo.update
+
+: update-zoneinfo ( -- )
+    "eggert" "tz" [
+        git-tag* sort last git-reset-hard drop
+        { "make" "leapseconds" } run-process drop
+        { "make" "version" } run-process drop
+        "vocab:zoneinfo" [
+            {
+                "africa"
+                "antarctica"
+                "asia"
+                "australasia"
+                "backward"
+                "backzone"
+                "calendars"
+                "etcetera"
+                "europe"
+                "factory"
+                "iso3166.tab"
+                "leapseconds"
+                "northamerica"
+                "southamerica"
+                "version"
+                "zone1970.tab"
+            } copy-output-files
+        ] with-out-directory
+    ] with-updated-github-repo ;
\ No newline at end of file