diff options
author | P. 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) |
commit | 4131620884a510e5e91cf0a9fd8670eacb31f2c6 (patch) | |
tree | 537e6e0880fcdc27efa203c0a095a18cb591c35e /build | |
parent | 735832832ac8422493b6ab9f06e6954a5c9cdc40 (diff) |
build: Install links listed in "backward" table.
Diffstat (limited to 'build')
-rwxr-xr-x | build | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -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 |