summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2013-10-09 13:19:17 (EDT)
committer P. J. McDermott <pjm@nac.net>2013-10-09 13:19:17 (EDT)
commit4131620884a510e5e91cf0a9fd8670eacb31f2c6 (patch)
tree537e6e0880fcdc27efa203c0a095a18cb591c35e
parent735832832ac8422493b6ab9f06e6954a5c9cdc40 (diff)
build: Install links listed in "backward" table.
-rwxr-xr-xbuild18
1 files changed, 18 insertions, 0 deletions
diff --git a/build b/build
index 94eedbc..24d2f22 100755
--- a/build
+++ b/build
@@ -46,4 +46,22 @@ install: build
"tzdata-$${t}.data/usr/share/zoneinfo/$${src}"; \
done; \
done
+ grep '^Link' src/backward | while read type dest src etc; do \
+ t="$$(cd src && grep -l \
+ "^Zone[ ][ ]*$${dest}[ ].*$$" \
+ $(tables))"; \
+ link="$${src}" up=''; \
+ while [ "$${link#*/}" != "$${link}" ] && \
+ [ "$${link%%/*}" = "$${dest%%/*}" ]; do \
+ link="$${link#*/}"; \
+ dest="$${dest#*/}"; \
+ done; \
+ while [ "$${link#*/}" != "$${link}" ]; do \
+ link="$${link#*/}"; \
+ up="../$${up}"; \
+ done; \
+ src="tzdata-$${t}.data/usr/share/zoneinfo/$${src}"; \
+ mkdir -p "$${src%/*}"; \
+ ln -sf "$${up}$${dest}" "$${src}"; \
+ done
ln -sf . tzdata-common.data/usr/share/zoneinfo/posix