Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/share/zoneinfo - create the directories if missing



details:   https://anonhg.NetBSD.org/src/rev/d5525c5adaa8
branches:  trunk
changeset: 785277:d5525c5adaa8
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Mar 06 17:32:51 2013 +0000

description:
- create the directories if missing
- use $() instead of ``

diffstat:

 share/zoneinfo/Makefile |  13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 729e954b9357 -r d5525c5adaa8 share/zoneinfo/Makefile
--- a/share/zoneinfo/Makefile   Wed Mar 06 17:03:41 2013 +0000
+++ b/share/zoneinfo/Makefile   Wed Mar 06 17:32:51 2013 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.43 2009/04/10 16:16:12 apb Exp $
+#      $NetBSD: Makefile,v 1.44 2013/03/06 17:32:51 christos Exp $
 
 .include <bsd.own.mk>
 
@@ -97,9 +97,16 @@
            find . -type f -print | xargs ${TOOL_STAT} -qf '%d,%i %N' | sort \
        | while read devino tzfile; do \
                destfile=${DESTDIR}${TZDIR}/$${tzfile#./}; \
+               destdir=$$(dirname $${destfile}); \
+               if [ ! -d "$$destdir" ]; then \
+                       ${_MKSHMSG_INSTALL} $$destdir; \
+                       ${_MKSHECHO} ${INSTALL_DIR} -o ${BINOWN} -g ${BINGRP} \
+                       $$destdir; \
+                       ${INSTALL_DIR} -o ${BINOWN} -g ${BINGRP} $$destdir; \
+               fi; \
                if [ "$$devino" = "$$lastdevino" ]; then \
-                       if  ldevino=`${TOOL_STAT} -qf '%d %i' $$lastfile` && \
-                           tdevino=`${TOOL_STAT} -qf '%d %i' $$destfile` && \
+                       if  ldevino=$$(${TOOL_STAT} -qf '%d %i' $$lastfile) && \
+                           tdevino=$$(${TOOL_STAT} -qf '%d %i' $$destfile) && \
                            [ "$$ldevino" = "$$tdevino" ]; then \
                                continue; \
                        fi; \



Home | Main Index | Thread Index | Old Index