summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2013-10-09 09:48:53 (EDT)
committer P. J. McDermott <pjm@nac.net>2013-10-09 09:48:53 (EDT)
commitce178201beeb0e7e535bb4b7769381f740ffc523 (patch)
treeca7ddd3cec60a5cfde1a352197d81fdbb35472df /build
parentf9ce8484c4c2f5d45b26094ed771d6d6d94c4e30 (diff)
build: Make time zone links into symbolic links.
Diffstat (limited to 'build')
-rwxr-xr-xbuild15
1 files changed, 15 insertions, 0 deletions
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 \