#!/bin/sh # Copyright 2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ if [ -z "${CHOST}" ] ; then CHOST=${0##*/} CHOST=${CHOST%-emerge} fi : ${SYSROOT=/usr/${CHOST}} : ${PORTAGE_CONFIGROOT=${SYSROOT}} if [ -z "${CHOST}" ] || [ ! -d "${SYSROOT}" ] ; then echo "cross-emerge: CHOST is not set properly" exit 1 fi : ${CBUILD=$(portageq envvar CBUILD)} FAKEROOT= if [ $(id -u) -ne 0 ] ; then type -P fakeroot >/dev/null && FAKEROOT=fakeroot fi exec ${FAKEROOT} emerge -q "$@"