1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-26 00:55:14 +00:00

Correctly handle directory names with space in PEAR_AUTOINSTALL

This is needed for pear-Symfony_Component_Finder update

PR:		ports/181672
Reported by:	Gasol Wu
This commit is contained in:
Antoine Brodin 2013-11-11 09:17:51 +00:00
parent 9dd296d407
commit e55a52ae04
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=333480

View File

@ -190,24 +190,24 @@ do-autogenerate-plist: patch
${ECHO_CMD} "Cannot generate packing list: package files outside PREFIX"; \
exit 1; fi;
@${ECHO_CMD} "${LPKGREGDIR}/package.xml" > ${PLIST}
# pkg_install needs to escape $ in directory name while pkg does not
# pkg_install needs to escape $ in directory name while pkg does not
.if defined(WITH_PKGNG)
@cd ${WRKDIR}/inst/${PREFIX} && ${FIND} . -type f | ${SORT} \
| ${CUT} -c 3- >> ${PLIST}
@DIRS=`cd ${WRKDIR}/inst/${PREFIX} && ${FIND} . -type d | ${SORT} -r | \
${CUT} -c 3-`; \
for d in $${DIRS}; do \
if [ ! -d ${LOCALBASE}/$${d} ]; then \
@cd ${WRKDIR}/inst/${PREFIX} && ${FIND} . -type d | ${SORT} -r | \
${CUT} -c 3- | \
while read d ; do \
if [ ! -d "${LOCALBASE}/$${d}" ]; then \
${ECHO_CMD} "@dirrmtry $${d}" >> ${PLIST}; \
fi; \
done
.else
@cd ${WRKDIR}/inst/${PREFIX} && ${FIND} . -type f | ${SORT} \
| ${CUT} -c 3- >> ${PLIST}
@DIRS=`cd ${WRKDIR}/inst/${PREFIX} && ${FIND} . -type d | ${SORT} -r | \
${CUT} -c 3- | ${SED} -e 's,\\$$,\\\\$$,g'`; \
for d in $${DIRS}; do \
if [ ! -d ${LOCALBASE}/$${d} ]; then \
@cd ${WRKDIR}/inst/${PREFIX} && ${FIND} . -type d | ${SORT} -r | \
${CUT} -c 3- | ${SED} -e 's,\$$,\\\\$$,g' | \
while read d ; do \
if [ ! -d "${LOCALBASE}/$${d}" ]; then \
${ECHO_CMD} "@dirrmtry $${d}" >> ${PLIST}; \
fi; \
done