diff options
author | Matthias Andree <mandree@FreeBSD.org> | 2013-11-23 12:23:19 +0000 |
---|---|---|
committer | Matthias Andree <mandree@FreeBSD.org> | 2013-11-23 12:23:19 +0000 |
commit | ed6f700839b666b8a3eae23f48e04335f942ce42 (patch) | |
tree | e71ae8523874d600df93a6217cec20348a068895 /Mk/Scripts/qa.sh | |
parent | Fix index build, typo in port name. (diff) |
- in qa.sh, properly work with filenames containing blank or tab,
by setting IFS to just LF
- in check-stagedir.sh, properly detect unset environmental variables,
and list them all
- in check-stagedir.sh, also list the full prefix as known, not just
its parents
PR: 184039
Approved by: portmgr (bapt)
Notes
Notes:
svn path=/head/; revision=334663
Diffstat (limited to 'Mk/Scripts/qa.sh')
-rw-r--r-- | Mk/Scripts/qa.sh | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Mk/Scripts/qa.sh b/Mk/Scripts/qa.sh index e2f49a40d73f..dbc3be4bce8b 100644 --- a/Mk/Scripts/qa.sh +++ b/Mk/Scripts/qa.sh @@ -7,6 +7,9 @@ if [ -z "${STAGEDIR}" -o -z "${PREFIX}" -o -z "${LOCALBASE}" ]; then exit 1 fi +LF=$(printf '\nX') +LF=${LF%X} + warn() { echo "Warning: $@" >&2 } @@ -17,7 +20,7 @@ err() { shebang() { rc=0 - for f in `find ${STAGEDIR} -type f`; do + IFS="$LF" ; for f in `find ${STAGEDIR} -type f`; do interp=$(sed -n -e '1s/^#![[:space:]]*\([^[:space:]]*\).*/\1/p;2q' $f) case "$interp" in "") ;; @@ -37,7 +40,7 @@ shebang() { symlinks() { rc=0 - for l in `find ${STAGEDIR} -type l`; do + IFS="$LF" ; for l in `find ${STAGEDIR} -type l`; do link=$(readlink ${l}) case "${link}" in ${STAGEDIR}*) err "Bad symlinks ${l} pointing inside the stage directory" @@ -50,7 +53,7 @@ symlinks() { paths() { rc=0 dirs="${STAGEDIR} ${WRKDIR}" - for f in `find ${STAGEDIR} -type f`;do + IFS="$LF" ; for f in `find ${STAGEDIR} -type f`;do for d in ${dirs}; do if grep -q ${d} ${f} ; then err "${f} is referring to ${d}" @@ -64,7 +67,7 @@ paths() { stripped() { [ -x /usr/bin/file ] || return # this is fatal [ -n "${STRIP}" ] || return 0 - for f in `find ${STAGEDIR} -type f`; do + IFS="$LF" ; for f in `find ${STAGEDIR} -type f`; do output=`/usr/bin/file ${f}` case "${output}" in *:*\ ELF\ *,\ not\ stripped*) warn "${f} is not stripped consider using \${STRIP_CMD}";; |