From ce178201beeb0e7e535bb4b7769381f740ffc523 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Wed, 09 Oct 2013 09:48:53 -0400 Subject: build: Make time zone links into symbolic links. --- (limited to 'build') diff --git a/build b/build index b78f0b4..29f5e12 100755 --- a/build +++ b/build @@ -28,6 +28,21 @@ build: install: build cp src/iso3166.tab src/zone.tab dest/usr/share/zoneinfo + (cd src && grep '^Link' $(tables)) | while read type dest src etc; do \ + rm -f "dest/usr/share/zoneinfo/$${src}"; \ + link="$${src}" up=''; \ + while [ "$${link#*/}" != "$${link}" ] && \ + [ "$${link%%/*}" = "$${dest%%/*}" ]; do \ + link="$${link#*/}"; \ + dest="$${dest#*/}"; \ + done; \ + while [ "$${link#*/}" != "$${link}" ]; do \ + link="$${link#*/}"; \ + up="../$${up}"; \ + done; \ + ln -sf "$${up}$${dest}" \ + "dest/usr/share/zoneinfo/$${src}"; \ + done for t in $(tables); do \ exec 3>../tzdata-$${t}.pkg/files; \ grep '^Zone' src/$${t} | while read type zone etc; do \ -- cgit v0.9.1