From 06c95255fd6e197f6152d4ff7c9d766f4b18d762 Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Sun, 15 Apr 2007 11:06:29 +0000 Subject: [PATCH] Merged from trunk 6410:6411 +------------------------------------------------------------------------+ | 6411 | convert `type -p` to `type -P` as noted by grobian | | SpankMan | | +------------------------------------------------------------------------+ svn path=/main/branches/prefix/; revision=6412 --- bin/ebuild.sh | 6 +++--- bin/emerge-webrsync | 6 +++--- bin/etc-update | 2 +- bin/misc-functions.sh | 10 +++++----- bin/prepall | 4 ++-- bin/prepstrip | 4 ++-- bin/sed | 2 +- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/bin/ebuild.sh b/bin/ebuild.sh index 355000eaf..5f0cbec02 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -462,7 +462,7 @@ econf() { local TMP_CONFCACHE_DIR CONFCACHE_ARG if hasq confcache $FEATURES && ! hasq confcache $RESTRICT; then - CONFCACHE="$(type -p confcache)" + CONFCACHE="$(type -P confcache)" if [ -z "${CONFCACHE}" ]; then ewarn "disabling confcache, binary cannot be found" else @@ -703,7 +703,7 @@ dyn_clean() { return 1 fi - if type -p chflags &>/dev/null; then + if type -P chflags > /dev/null ; then chflags -R noschg,nouchg,nosappnd,nouappnd "${PORTAGE_BUILDDIR}" chflags -R nosunlnk,nouunlnk "${PORTAGE_BUILDDIR}" 2>/dev/null fi @@ -1421,7 +1421,7 @@ QA_INTERCEPTORS="javac java-config python python-config perl grep egrep fgrep se # level the QA interceptors if we're in depend if hasq "depend" "${EBUILD_SH_ARGS}"; then for BIN in ${QA_INTERCEPTORS}; do - BIN_PATH=$(type -pf ${BIN}) + BIN_PATH=$(type -Pf ${BIN}) if [ "$?" != "0" ]; then BODY="echo \"*** missing command: ${BIN}\" >&2; return 127" else diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync index 91ffa0392..4ce47ac49 100755 --- a/bin/emerge-webrsync +++ b/bin/emerge-webrsync @@ -38,9 +38,9 @@ else fi fi -if type -p md5sum > /dev/null; then +if type -P md5sum > /dev/null; then md5_com='md5sum -c "${FILE}.md5sum"' -elif type -p md5 > /dev/null; then +elif type -P md5 > /dev/null; then md5_com='[ "$(md5 -q ${FILE})" == "$(cut -d \ -f 1 ${FILE}.md5sum)" ]' else echo "warning, unable to do md5 verification of the snapshot!" @@ -50,7 +50,7 @@ fi sync_local() { echo Syncing local tree... - if type -p tarsync &> /dev/null; then + if type -P tarsync &> /dev/null; then # tarsync doesn't take numeric uid/gid so we need to convert them. local inst_user="$(python -c "import pwd; print pwd.getpwuid(int('${PORTAGE_INST_UID:-0}'))[0]")" local inst_group="$(python -c "import grp; print grp.getgrgid(int('${PORTAGE_INST_GID:-0}'))[0]")" diff --git a/bin/etc-update b/bin/etc-update index d1193bd43..35720f6a8 100755 --- a/bin/etc-update +++ b/bin/etc-update @@ -10,7 +10,7 @@ # Leo Lipelis # Karl Trygve Kalleberg -if type -p gsed >/dev/null ; then +if type -P gsed >/dev/null ; then function sed() { gsed "$@"; } fi diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh index 991e6fba5..5ede5ffc1 100644 --- a/bin/misc-functions.sh +++ b/bin/misc-functions.sh @@ -56,7 +56,7 @@ install_qa_check() { sleep 1 done - if type -p scanelf > /dev/null && ! hasq binchecks ${RESTRICT}; then + if type -P scanelf > /dev/null && ! hasq binchecks ${RESTRICT}; then local qa_var insecure_rpath=0 tmp_quiet=${PORTAGE_QUIET} # display warnings when using stricter because we die afterwards @@ -433,8 +433,8 @@ install_mask() { } preinst_bsdflags() { - type -p chflags &>/dev/null || return 0 - type -p mtree &>/dev/null || return 1 + type -P chflags > /dev/null || return 0 + type -P mtree > /dev/null || return 1 # Save all the file flags for restoration after installation. mtree -c -p "${ED}" -k flags > "${T}/bsdflags.mtree" # Remove all the file flags so that the merge phase can do anything @@ -444,8 +444,8 @@ preinst_bsdflags() { } postinst_bsdflags() { - type -p chflags &>/dev/null || return 0 - type -p mtree &>/dev/null || return 1 + type -P chflags > /dev/null || return 0 + type -P mtree > /dev/null || return 1 # Restore all the file flags that were saved before installation. mtree -e -p "${EROOT}" -U -k flags < "${T}/bsdflags.mtree" &> /dev/null } diff --git a/bin/prepall b/bin/prepall index 269765a96..95b9998bb 100755 --- a/bin/prepall +++ b/bin/prepall @@ -3,7 +3,7 @@ # Distributed under the terms of the GNU General Public License v2 # $Id: prepall 2230 2005-11-01 01:35:59Z vapier $ -if type -p chflags &>/dev/null && type -p mtree &>/dev/null; then +if type -P chflags > /dev/null && type -P mtree > /dev/null ; then # Save all the file flags for restoration at the end of prepall. mtree -c -p "${ED}" -k flags > "${T}/bsdflags.mtree" # Remove all the file flags so that prepall can do anything necessary. @@ -19,7 +19,7 @@ ecompress --dequeue prepallstrip -if type -p chflags &>/dev/null && type -p mtree &>/dev/null; then +if type -P chflags > /dev/null && type -P mtree > /dev/null; then # Restore all the file flags that were saved at the beginning of prepall. mtree -U -e -p "${ED}" -k flags < "${T}/bsdflags.mtree" &> /dev/null fi diff --git a/bin/prepstrip b/bin/prepstrip index 6666d3202..2aeda2161 100755 --- a/bin/prepstrip +++ b/bin/prepstrip @@ -14,9 +14,9 @@ then fi STRIP=${STRIP:-${CHOST}-strip} -type -p -- ${STRIP} > /dev/null || STRIP=strip +type -P -- ${STRIP} > /dev/null || STRIP=strip OBJCOPY=${OBJCOPY:-${CHOST}-objcopy} -type -p -- ${OBJCOPY} > /dev/null || OBJCOPY=objcopy +type -P -- ${OBJCOPY} > /dev/null || OBJCOPY=objcopy export PORTAGE_STRIP_FLAGS=${PORTAGE_STRIP_FLAGS:---strip-unneeded} diff --git a/bin/sed b/bin/sed index 6996b43a0..d0ad70a74 100755 --- a/bin/sed +++ b/bin/sed @@ -6,7 +6,7 @@ scriptpath="${BASH_SOURCE[0]}" if [[ -n ${ESED} ]]; then exec ${ESED} "$@" -elif type -p gsed > /dev/null ; then +elif type -P gsed > /dev/null ; then exec gsed "$@" else old_IFS="${IFS}" -- 2.26.2