fi
fi
-if [ -n "$#" ]; then
- ARGS="${*}"
-fi
+EBUILD_SH_ARGS="$*"
+
+shift $#
# Prevent aliases from causing portage to act inappropriately.
# Make sure it's before everything so we don't mess aliases that follow.
# === === === === === functions end, main part begins === === === === ===
# === === === === === === === === === === === === === === === === === ===
-if [ "$*" != "depend" ] && [ "$*" != "clean" ] && [ "$*" != "setup" ]; then
+if [[ ${EBUILD_SH_ARGS} != "depend" ]] && [[ ${EBUILD_SH_ARGS} != "clean" ]] && [[ ${EBUILD_SH_ARGS} != "setup" ]]; then
cd ${PORTAGE_TMPDIR} &> /dev/null
cd ${BUILD_PREFIX} &> /dev/null
[[ ${!x-UNSET_VAR} != UNSET_VAR ]] && declare -r ${x}
done
# Need to be able to change D in dyn_preinst due to the IMAGE stuff
-[[ $* != "preinst" ]] && declare -r D
+[[ ${EBUILD_SH_ARGS} != "preinst" ]] && declare -r D
unset x
# Turn of extended glob matching so that g++ doesn't get incorrectly matched.
QA_INTERCEPTORS="javac java-config python python-config perl grep egrep fgrep sed gcc g++ cc bash awk nawk gawk pkg-config"
# level the QA interceptors if we're in depend
-if hasq "depend" "$@"; then
+if hasq "depend" "${EBUILD_SH_ARGS}"; then
for BIN in ${QA_INTERCEPTORS}; do
BIN_PATH=$(type -pf ${BIN})
if [ "$?" != "0" ]; then
fi
#wipe the interceptors. we don't want saved.
-if hasq "depend" "$@"; then
+if hasq "depend" "${EBUILD_SH_ARGS}"; then
unset -f $QA_INTERCEPTORS
unset QA_INTERCEPTORS
fi
set +f
-for myarg in $*; do
+for myarg in ${EBUILD_SH_ARGS} ; do
case $myarg in
nofetch)
pkg_nofetch