* In helpers_die arguments, display ${0##*/} instead of $0 since $0
authorZac Medico <zmedico@gentoo.org>
Thu, 19 Aug 2010 06:31:49 +0000 (23:31 -0700)
committerZac Medico <zmedico@gentoo.org>
Thu, 19 Aug 2010 06:31:49 +0000 (23:31 -0700)
  is needlessly long.
* When calling helpers_die from a function, use ${FUNCNAME[0]} in
  arguments instead of $0.

32 files changed:
bin/ebuild-helpers/dobin
bin/ebuild-helpers/doconfd
bin/ebuild-helpers/dodir
bin/ebuild-helpers/dodoc
bin/ebuild-helpers/doenvd
bin/ebuild-helpers/doexe
bin/ebuild-helpers/dohtml
bin/ebuild-helpers/doinfo
bin/ebuild-helpers/doinitd
bin/ebuild-helpers/doins
bin/ebuild-helpers/dolib
bin/ebuild-helpers/doman
bin/ebuild-helpers/domo
bin/ebuild-helpers/dosbin
bin/ebuild-helpers/dosym
bin/ebuild-helpers/ecompress
bin/ebuild-helpers/ecompressdir
bin/ebuild-helpers/emake
bin/ebuild-helpers/fowners
bin/ebuild-helpers/fperms
bin/ebuild-helpers/newbin
bin/ebuild-helpers/newconfd
bin/ebuild-helpers/newdoc
bin/ebuild-helpers/newenvd
bin/ebuild-helpers/newexe
bin/ebuild-helpers/newinitd
bin/ebuild-helpers/newins
bin/ebuild-helpers/newlib.a
bin/ebuild-helpers/newlib.so
bin/ebuild-helpers/newman
bin/ebuild-helpers/newsbin
bin/ebuild.sh

index fc0b0359f1998c803527292d4f3557ae9c06405e..e385455d7d2fd80d6c0d9082449e6bd719ace335 100755 (executable)
@@ -1,16 +1,16 @@
 #!/bin/bash
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 
 if [[ $# -lt 1 ]] ; then
-       helpers_die "$0: at least one argument needed"
+       helpers_die "${0##*/}: at least one argument needed"
        exit 1
 fi
 
 if [[ ! -d ${D}${DESTTREE}/bin ]] ; then
-       install -d "${D}${DESTTREE}/bin" || { helpers_die "$0: failed to install ${D}${DESTTREE}/bin"; exit 2; }
+       install -d "${D}${DESTTREE}/bin" || { helpers_die "${0##*/}: failed to install ${D}${DESTTREE}/bin"; exit 2; }
 fi
 
 ret=0
@@ -25,5 +25,5 @@ for x in "$@" ; do
        ((ret|=$?))
 done
 
-[[ $ret -ne 0 ]] && helpers_die "$0 failed"
+[[ $ret -ne 0 ]] && helpers_die "${0##*/} failed"
 exit ${ret}
index 749372a4a7a83f104fa4ab63942bc7ebc19754f8..e146000227eefafb34e86bdb3709bcac2cbe4587 100755 (executable)
@@ -1,10 +1,10 @@
 #!/bin/bash
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 if [[ $# -lt 1 ]] ; then
        source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
-       helpers_die "$0: at least one argument needed"
+       helpers_die "${0##*/}: at least one argument needed"
        exit 1
 fi
 
index 58303b2fcc30bf3083dd45a17322055d3d243108..f40bee7e48f6db5395d0717d8db67fc8a76e7dcf 100755 (executable)
@@ -1,10 +1,10 @@
 #!/bin/bash
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 
 install -d ${DIROPTIONS} "${@/#/${D}/}"
 ret=$?
-[[ $ret -ne 0 ]] && helpers_die "$0 failed"
+[[ $ret -ne 0 ]] && helpers_die "${0##*/} failed"
 exit $ret
index 6d750c9392d808b1c51fe516ca8f93bd251c1b55..29b69011260dc7c376857913b8db6b8d0008eb95 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 1999-2007 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
@@ -25,5 +25,5 @@ for x in "$@" ; do
        fi
 done
 
-[[ $ret -ne 0 ]] && helpers_die "$0 failed"
+[[ $ret -ne 0 ]] && helpers_die "${0##*/} failed"
 exit ${ret}
index bd21f5aead84a8db75d890c59d536d675d0dd51c..28ab5d23438a0887180554bdb0cd77dfcfd8b9e5 100755 (executable)
@@ -1,10 +1,10 @@
 #!/bin/bash
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 if [[ $# -lt 1 ]] ; then
        source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
-       helpers_die "$0: at least one argument needed"
+       helpers_die "${0##*/}: at least one argument needed"
        exit 1
 fi
 
index 191e7f91898c8decbf44c741665f40cc289bc68e..360800e02e5ea0cb5a35700c9fdc1743dd91372c 100755 (executable)
@@ -1,11 +1,11 @@
 #!/bin/bash
-# Copyright 1999-2007 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 
 if [[ $# -lt 1 ]] ; then
-       helpers_die "$0: at least one argument needed"
+       helpers_die "${0##*/}: at least one argument needed"
        exit 1
 fi
 
@@ -39,5 +39,5 @@ done
 
 rm -rf "$TMP"
 
-[[ $ret -ne 0 ]] && helpers_die "$0 failed"
+[[ $ret -ne 0 ]] && helpers_die "${0##*/} failed"
 exit $ret
index cb29dc3f3e13de2a1835198cdef0e6402f617706..630629a4bf7b20f9f4f133d9b6635548561d91cd 100755 (executable)
@@ -10,5 +10,5 @@ PYTHONPATH=$PORTAGE_PYM_PATH${PYTHONPATH:+:}$PYTHONPATH \
        "${PORTAGE_PYTHON:-/usr/bin/python}" "$PORTAGE_BIN_PATH/dohtml.py" "$@"
 
 ret=$?
-[[ $ret -ne 0 ]] && helpers_die "$0 failed"
+[[ $ret -ne 0 ]] && helpers_die "${0##*/} failed"
 exit $ret
index 2c3d1e0718aaecf2e645ca69239cde0a9fd38968..54fb8dac2ead471904fd93eed326bd537b2b4f16 100755 (executable)
@@ -10,7 +10,7 @@ if [[ -z $1 ]] ; then
 fi
 
 if [[ ! -d ${D}usr/share/info ]] ; then
-       install -d "${D}usr/share/info" || { helpers_die "$0: failed to install ${D}usr/share/info"; exit 1; }
+       install -d "${D}usr/share/info" || { helpers_die "${0##*/}: failed to install ${D}usr/share/info"; exit 1; }
 fi
 
 install -m0644 "$@" "${D}usr/share/info"
@@ -19,6 +19,6 @@ if [ $rval -ne 0 ] ; then
        for x in "$@" ; do
                [ -e "$x" ] || echo "!!! ${0##*/}: $x does not exist" 1>&2
        done
-       helpers_die "$0 failed"
+       helpers_die "${0##*/} failed"
 fi
 exit $rval
index 8ea51f1ee1a7050d6ea349917002a4021d384381..b711e190a67175e75de85cdbdb66017fa611f680 100755 (executable)
@@ -1,10 +1,10 @@
 #!/bin/bash
-# Copyright 1999-2007 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 if [[ $# -lt 1 ]] ; then
        source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
-       helpers_die "$0: at least one argument needed"
+       helpers_die "${0##*/}: at least one argument needed"
        exit 1
 fi
 
index c59b9bcfdff83e9daa11b8230d369ea136c51ef4..bbc4e97b6b3a3e8ae8c58440b88a8266e653bb5c 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 1999-2009 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
@@ -21,7 +21,7 @@ if [[ ${INSDESTTREE#${D}} != "${INSDESTTREE}" ]]; then
        vecho "You should not use \${D} with helpers." 1>&2
        vecho "  --> ${INSDESTTREE}" 1>&2
        vecho "-------------------------------------------------------" 1>&2
-       helpers_die "$0 used with \${D}"
+       helpers_die "${0##*/} used with \${D}"
        exit 1
 fi
 
@@ -127,4 +127,4 @@ for x in "$@" ; do
        fi
 done
 rm -rf "$TMP"
-[[ $failed -ne 0 || $success -eq 0 ]] && { helpers_die "$0 failed"; exit 1; } || exit 0
+[[ $failed -ne 0 || $success -eq 0 ]] && { helpers_die "${0##*/} failed"; exit 1; } || exit 0
index 821e1321e2acd3dbca76496a55a74130d962a840..87ade425aa9e17a121ce6cb9195fd99d5d77f217 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
@@ -16,11 +16,11 @@ libdir="${D}${DESTTREE}/${CONF_LIBDIR}"
 
 
 if [[ $# -lt 1 ]] ; then
-       helpers_die "$0: at least one argument needed"
+       helpers_die "${0##*/}: at least one argument needed"
        exit 1
 fi
 if [[ ! -d ${libdir} ]] ; then
-       install -d "${libdir}" || { helpers_die "$0: failed to install ${libdir}"; exit 1; }
+       install -d "${libdir}" || { helpers_die "${0##*/}: failed to install ${libdir}"; exit 1; }
 fi
 
 ret=0
@@ -39,5 +39,5 @@ for x in "$@" ; do
        ((ret|=$?))
 done
 
-[[ $ret -ne 0 ]] && helpers_die "$0 failed"
+[[ $ret -ne 0 ]] && helpers_die "${0##*/} failed"
 exit ${ret}
index 0d95c18baeb964a063516d4bfbc594f7c0e06175..1862f83e1d51f37160372603d503a36ce8d776c4 100755 (executable)
@@ -1,11 +1,11 @@
 #!/bin/bash
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 
 if [[ $# -lt 1 ]] ; then
-       helpers_die "$0: at least one argument needed"
+       helpers_die "${0##*/}: at least one argument needed"
        exit 1
 fi
 
@@ -60,5 +60,5 @@ for x in "$@" ; do
        fi
 done
 
-[[ $ret -ne 0 ]] && helpers_die "$0 failed"
+[[ $ret -ne 0 ]] && helpers_die "${0##*/} failed"
 exit ${ret}
index 43f78d010bafee8fade038d7ba690eb9a6358f4c..4737f44e10e7ba5a0506847d21a76fc50cf82c05 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
@@ -30,5 +30,5 @@ for x in "$@" ; do
        ((ret|=$?))
 done
 
-[[ $ret -ne 0 ]] && helpers_die "$0 failed"
+[[ $ret -ne 0 ]] && helpers_die "${0##*/} failed"
 exit $ret
index a16015ed6e871e0651ab507e44b2420cbc8c768d..87a30914afd472bb3706f0528d1356075555e041 100755 (executable)
@@ -1,16 +1,16 @@
 #!/bin/bash
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 
 if [[ $# -lt 1 ]] ; then
-       helpers_die "$0: at least one argument needed"
+       helpers_die "${0##*/}: at least one argument needed"
        exit 1
 fi
 
 if [[ ! -d ${D}${DESTTREE}/sbin ]] ; then
-       install -d "${D}${DESTTREE}/sbin" || { helpers_die "$0: failed to install ${D}${DESTTREE}/sbin"; exit 2; }
+       install -d "${D}${DESTTREE}/sbin" || { helpers_die "${0##*/}: failed to install ${D}${DESTTREE}/sbin"; exit 2; }
 fi
 
 ret=0
@@ -25,5 +25,5 @@ for x in "$@" ; do
        ((ret|=$?))
 done
 
-[[ $ret -ne 0 ]] && helpers_die "$0 failed"
+[[ $ret -ne 0 ]] && helpers_die "${0##*/} failed"
 exit ${ret}
index 1015a28e577a212f2aefb7ff1de9b294dccfb2d0..500dad0944ef20113c2fa93afa4f2498f57baf78 100755 (executable)
@@ -1,11 +1,11 @@
 #!/bin/bash
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 
 if [[ $# -ne 2 ]] ; then
-       helpers_die "$0: two arguments needed"
+       helpers_die "${0##*/}: two arguments needed"
        exit 1
 fi
 
@@ -14,5 +14,5 @@ destdir=${2%/*}
 
 ln -snf "$1" "${D}$2"
 ret=$?
-[[ $ret -ne 0 ]] && helpers_die "$0 failed"
+[[ $ret -ne 0 ]] && helpers_die "${0##*/} failed"
 exit $ret
index 8e6fc9c8d86b2ca844231fbef17891d2cdd69d38..ef01cd4e0b97aa21a48c9a1a1ff1c121747af0da 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 1999-2007 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
@@ -97,7 +97,7 @@ case $1 in
                shift
                touch "${@/%/.ecompress.file}"
                ret=$?
-               [[ $ret -ne 0 ]] && helpers_die "$0 failed"
+               [[ $ret -ne 0 ]] && helpers_die "${0##*/} failed"
                exit $ret
                ;;
        --dequeue)
@@ -147,7 +147,7 @@ case $1 in
                # Finally, let's actually do some real work
                "${PORTAGE_COMPRESS}" ${PORTAGE_COMPRESS_FLAGS} "$@"
                ret=$?
-               [[ $ret -ne 0 ]] && helpers_die "$0 failed"
+               [[ $ret -ne 0 ]] && helpers_die "${0##*/} failed"
                exit $ret
                ;;
 esac
index fdecaf0a23b36cc8168c92f382179f7552ea2385..6cbb53f9af624c7913e7bdcdf81e66f1025c0890 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 1999-2007 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
@@ -23,7 +23,7 @@ case $1 in
                set -- "${@/#/${D}}"
                touch "$@"
                ret=$?
-               [[ $ret -ne 0 ]] && helpers_die "$0 failed"
+               [[ $ret -ne 0 ]] && helpers_die "${0##*/} failed"
                exit $?
                ;;
        --dequeue)
@@ -135,5 +135,5 @@ for dir in "$@" ; do
        restore_skip_dirs
 done
 
-[[ $ret -ne 0 ]] && helpers_die "$0 failed"
+[[ $ret -ne 0 ]] && helpers_die "${0##*/} failed"
 exit ${ret}
index b019bfe97b51f36541318e18a27134535dbee6bc..ca1901ef978f085b1944ddfc532b31aceea35011 100755 (executable)
@@ -25,5 +25,5 @@ fi
 
 ${MAKE:-make} ${MAKEOPTS} ${EXTRA_EMAKE} "$@"
 ret=$?
-[[ $ret -ne 0 ]] && helpers_die "$0 failed"
+[[ $ret -ne 0 ]] && helpers_die "${0##*/} failed"
 exit $ret
index 95a49fdad0d1ee7b2986f59df833f24e83c51ba2..4cc6bfaccedef8d3f75ac1a2ef68f0ee382098e0 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 1999-2007 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
@@ -9,5 +9,5 @@ source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 slash="/"
 chown "${@/#${slash}/${D}${slash}}"
 ret=$?
-[[ $ret -ne 0 ]] && helpers_die "$0 failed"
+[[ $ret -ne 0 ]] && helpers_die "${0##*/} failed"
 exit $ret
index cdd409a057aba40c54b9df34db46aaec1976f234..0260bdc476248bde0596f5aa8f1cd777db51b510 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 1999-2007 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
@@ -9,5 +9,5 @@ source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 slash="/"
 chmod "${@/#${slash}/${D}${slash}}"
 ret=$?
-[[ $ret -ne 0 ]] && helpers_die "$0 failed"
+[[ $ret -ne 0 ]] && helpers_die "${0##*/} failed"
 exit $ret
index 7bfb19407b34a4919bc0a6a54f42a43bbe94c5d1..30f19b062a261931170d0cb52b2d68c007764129 100755 (executable)
@@ -1,11 +1,11 @@
 #!/bin/bash
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 
 if [[ -z ${T} ]] || [[ -z ${2} ]] ; then
-       helpers_die "$0: Need two arguments, old file and new file"
+       helpers_die "${0##*/}: Need two arguments, old file and new file"
        exit 1
 fi
 
index 68a7ed76bcce1316e7fed07ebd7b6f296d389dfc..5752cfa7bdfa85b13afc4e9f9fbdc3ef8f133c26 100755 (executable)
@@ -1,11 +1,11 @@
 #!/bin/bash
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 
 if [[ -z ${T} ]] || [[ -z ${2} ]] ; then
-       helpers_die "$0: Need two arguments, old file and new file"
+       helpers_die "${0##*/}: Need two arguments, old file and new file"
        exit 1
 fi
 
index 1a353784d22719552a8153fc544d82928c335a90..f97ce0d67d62925ae1941b6a6ef2e7b04d2d6a14 100755 (executable)
@@ -1,11 +1,11 @@
 #!/bin/bash
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 
 if [[ -z ${T} ]] || [[ -z ${2} ]] ; then
-       helpers_die "$0: Need two arguments, old file and new file"
+       helpers_die "${0##*/}: Need two arguments, old file and new file"
        exit 1
 fi
 
index c7a073202cd0cd20db689c2a62e1463ab2a4c1b2..83c556e7e402b169a14af59879c1cdefc8537832 100755 (executable)
@@ -1,11 +1,11 @@
 #!/bin/bash
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 
 if [[ -z ${T} ]] || [[ -z ${2} ]] ; then
-       helpers_die "$0: Need two arguments, old file and new file"
+       helpers_die "${0##*/}: Need two arguments, old file and new file"
        exit 1
 fi
 
index b2173fbfb413245c800984dcbae920e6f45a98b1..92dbe9f073c9da6782998abaa406fc97db8c2fc7 100755 (executable)
@@ -1,11 +1,11 @@
 #!/bin/bash
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 
 if [[ -z ${T} ]] || [[ -z ${2} ]] ; then
-       helpers_die "$0: Need two arguments, old file and new file"
+       helpers_die "${0##*/}: Need two arguments, old file and new file"
        exit 1
 fi
 
index 384942604bbef10fe5f9101ea4243e7250fab36d..fc6003ac2983effdf6cbbe3c7af3f3bf93615f38 100755 (executable)
@@ -1,11 +1,11 @@
 #!/bin/bash
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 
 if [[ -z ${T} ]] || [[ -z ${2} ]] ; then
-       helpers_die "$0: Need two arguments, old file and new file"
+       helpers_die "${0##*/}: Need two arguments, old file and new file"
        exit 1
 fi
 
index 3d4870f8d703f028ab5bbd3bb66101491fe927f2..9da212fb5ff2c58b5464bdbe481b976f5ab17839 100755 (executable)
@@ -1,11 +1,11 @@
 #!/bin/bash
-# Copyright 1999-2009 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 
 if [[ -z ${T} ]] || [[ -z ${2} ]] ; then
-       helpers_die "$0: Need two arguments, old file and new file"
+       helpers_die "${0##*/}: Need two arguments, old file and new file"
        exit 1
 fi
 
@@ -22,12 +22,12 @@ case "$EAPI" in
        *)
                cp -P "$1" "$T/$2"
                ret=$?
-               [[ $ret -ne 0 ]] && helpers_die "$0 failed"
+               [[ $ret -ne 0 ]] && helpers_die "${0##*/} failed"
                exit $ret
                ;;
 esac
 doins "${T}/${2}"
 ret=$?
 rm -rf "${T}/${2}"
-[[ $ret -ne 0 ]] && helpers_die "$0 failed"
+[[ $ret -ne 0 ]] && helpers_die "${0##*/} failed"
 exit $ret
index cdc908245eb450c83182c0654384ef6bc7f25533..eef4104bef4512785d55a2d6e9784808b98bb181 100755 (executable)
@@ -1,11 +1,11 @@
 #!/bin/bash
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 
 if [[ -z ${T} ]] || [[ -z ${2} ]] ; then
-       helpers_die "$0: Need two arguments, old file and new file"
+       helpers_die "${0##*/}: Need two arguments, old file and new file"
        exit 1
 fi
 
index cd14693257be3aa8b7cbca82ed64e7e7653b2379..c8696f33012efcc300629dcc7789067545c88a2a 100755 (executable)
@@ -1,11 +1,11 @@
 #!/bin/bash
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 
 if [[ -z ${T} ]] || [[ -z ${2} ]] ; then
-       helpers_die "$0: Need two arguments, old file and new file"
+       helpers_die "${0##*/}: Need two arguments, old file and new file"
        exit 1
 fi
 
index fdc2fe629290bf4084c61cc762775d0a58832945..ffb8a2de1d208e0140f96d242ce3cf6a2657e5af 100755 (executable)
@@ -1,11 +1,11 @@
 #!/bin/bash
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 
 if [[ -z ${T} ]] || [[ -z ${2} ]] ; then
-       helpers_die "$0: Need two arguments, old file and new file"
+       helpers_die "${0##*/}: Need two arguments, old file and new file"
        exit 1
 fi
 
index 4d21549af521ba9e38ade6747b62ad90573122a5..82242aa955a5b2d6e0f310b30626229d0f38541b 100755 (executable)
@@ -1,11 +1,11 @@
 #!/bin/bash
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 
 if [[ -z ${T} ]] || [[ -z ${2} ]] ; then
-       helpers_die "$0: Need two arguments, old file and new file"
+       helpers_die "${0##*/}: Need two arguments, old file and new file"
        exit 1
 fi
 
index 8813bd6d0b8d89023bc3a3dbd28b3a089afb8564..432da64654edfe53f024f15717802a8a6271194b 100755 (executable)
@@ -780,7 +780,7 @@ into() {
                        install -d "${D}${DESTTREE}"
                        local ret=$?
                        if [[ $ret -ne 0 ]] ; then
-                               helpers_die "$0 failed"
+                               helpers_die "${FUNCNAME[0]} failed"
                                return $ret
                        fi
                fi
@@ -796,7 +796,7 @@ insinto() {
                        install -d "${D}${INSDESTTREE}"
                        local ret=$?
                        if [[ $ret -ne 0 ]] ; then
-                               helpers_die "$0 failed"
+                               helpers_die "${FUNCNAME[0]} failed"
                                return $ret
                        fi
                fi
@@ -812,7 +812,7 @@ exeinto() {
                        install -d "${D}${_E_EXEDESTTREE_}"
                        local ret=$?
                        if [[ $ret -ne 0 ]] ; then
-                               helpers_die "$0 failed"
+                               helpers_die "${FUNCNAME[0]} failed"
                                return $ret
                        fi
                fi
@@ -828,7 +828,7 @@ docinto() {
                        install -d "${D}usr/share/doc/${PF}/${_E_DOCDESTTREE_}"
                        local ret=$?
                        if [[ $ret -ne 0 ]] ; then
-                               helpers_die "$0 failed"
+                               helpers_die "${FUNCNAME[0]} failed"
                                return $ret
                        fi
                fi