From d79f48086be8139ffd881c0ff420dcab69a7033e Mon Sep 17 00:00:00 2001 From: christos Date: Wed, 6 Mar 2013 17:32:51 +0000 Subject: [PATCH] - create the directories if missing - use $() instead of `` --- share/zoneinfo/Makefile | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/share/zoneinfo/Makefile b/share/zoneinfo/Makefile index fff0b9ce2e38..149c36b6ea9b 100644 --- a/share/zoneinfo/Makefile +++ b/share/zoneinfo/Makefile @@ -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 @@ -97,9 +97,16 @@ afterinstall: ${DATA} ${REDO} ${TABDATA} 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; \