aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authorbdrewery <bdrewery@FreeBSD.org>2014-04-25 06:42:06 +0800
committerbdrewery <bdrewery@FreeBSD.org>2014-04-25 06:42:06 +0800
commit641a7a38bda62394eb86cdd2c325c77df5873944 (patch)
treef923cb7d563d6c4e23802c4f397784b6320b6ac1 /Mk
parent6a8a5ae22ebd90ecfd548373d6388510115efcfd (diff)
downloadfreebsd-ports-gnome-641a7a38bda62394eb86cdd2c325c77df5873944.tar.gz
freebsd-ports-gnome-641a7a38bda62394eb86cdd2c325c77df5873944.tar.zst
freebsd-ports-gnome-641a7a38bda62394eb86cdd2c325c77df5873944.zip
- Fix check-stagedir causing staging violating. Quote all directory names
when doing plist checks. This could leak out if an unsupported format was used such as 'rmdir -p' or 'rmdir dir1 dir2 dir3' With hat: portmgr Reported by: antoine Pointyhat to: bdrewery
Diffstat (limited to 'Mk')
-rw-r--r--Mk/Scripts/check-stagedir.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/Mk/Scripts/check-stagedir.sh b/Mk/Scripts/check-stagedir.sh
index d6e6c78ebeb6..04ff8d2463a1 100644
--- a/Mk/Scripts/check-stagedir.sh
+++ b/Mk/Scripts/check-stagedir.sh
@@ -364,8 +364,11 @@ check_missing_plist_items() {
mkdir ${WRKDIR}/.missing-dirs
comm -23 ${WRKDIR}/.plist-dirs-sorted-no-comments \
${WRKDIR}/.staged-dirs-sorted > ${WRKDIR}/.missing-plist-dirs
- sed "s,^,${WRKDIR}/.missing-dirs," ${WRKDIR}/.missing-plist-dirs | \
- xargs mkdir -p
+ # Creates the dirs in WRKDIR/.missing-dirs and ensure spaces are
+ # quoted.
+ sed -e "s,^,${WRKDIR}/.missing-dirs," \
+ -e 's,^\(.*\)$,"\1",' \
+ ${WRKDIR}/.missing-plist-dirs | xargs mkdir -p
find -ds ${WRKDIR}/.missing-dirs | \
sed -e "s,^${WRKDIR}/.missing-dirs,," | \
while read dir; do \