Fix check-orphans with no MTREE_FILE

This commit is contained in:
Baptiste Daroussin 2013-10-04 15:31:35 +00:00
parent 118351a27f
commit d1d0613d96
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=329325

View File

@ -119,10 +119,14 @@ check-orphans: stage
*) ${ECHO_CMD} $$cwd/$$line ;; \
esac ; \
done < ${TMPPLIST} > ${WRKDIR}/.expanded-plist
.if !empty(MTREE_FILE)
@{ ${ECHO_CMD} "#mtree"; ${CAT} ${MTREE_FILE}; } | ${TAR} tf - | \
awk '{ sub(/^\.$$/, "", $$1); \
if ($$1 == "") print "${PREFIX}"; else print "${PREFIX}/"$$1; }' \
> ${WRKDIR}/.mtree
.else
@: > ${WRKDIR}/.mtree
.endif
@a=${PREFIX}; \
while :; do \
a=$${a%/*} ; \