From 4131620884a510e5e91cf0a9fd8670eacb31f2c6 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Wed, 09 Oct 2013 13:19:17 -0400 Subject: build: Install links listed in "backward" table. --- 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 -- cgit v0.9.1