blob: c678dd07153f429bc517b637745ed292d5c6a2a2 [file] [log] [blame]
#!/bin/bash
# Copyright 2009-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
scriptpath=${BASH_SOURCE[0]}
scriptname=${scriptpath##*/}
PORTAGE_BIN_PATH=${PORTAGE_BIN_PATH:-/usr/local/google/home/vapier/src/android/mdk/build/portage/tmp/prefix-portage-2.2.14/destdir/usr/lib/portage/bin}
PORTAGE_PYM_PATH=${PORTAGE_PYM_PATH:-/usr/local/google/home/vapier/src/android/mdk/build/portage/tmp/prefix-portage-2.2.14/destdir/usr/lib/portage/pym}
# Use safe cwd, avoiding unsafe import for bug #469338.
cd "${PORTAGE_PYM_PATH}"
IFS=':'
set -f # in case ${PATH} contains any shell glob characters
for path in ${PATH}; do
[[ -x ${path}/${scriptname} ]] || continue
[[ ${path}/${scriptname} -ef ${scriptpath} ]] && continue
PYTHONPATH=${PORTAGE_PYTHONPATH:-${PORTAGE_PYM_PATH}} \
exec "${PORTAGE_PYTHON:-/usr/bin/python}" \
"${path}/${scriptname}" "$@"
done
unset IFS
echo "${scriptname}: command not found" 1>&2
exit 127