aboutsummaryrefslogtreecommitdiff
blob: 27f10b09aa5fdf038e1bb4eaacb5f54e0950dcd7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash
# Copyright 2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

# -solar

[[ $CHOST == "" ]] && { echo "CHOST is not set" ; exit 1 ; }

export CBUILD=$(portageq envvar CBUILD)
export SYSROOT="/usr/${CHOST}"
export PORTAGE_CONFIGROOT="/usr/${CHOST}"

FAKEROOT=
if [[ $(id -u) != 0 ]]; then
	[[ $(type -p fakeroot) != "" ]] && FAKEROOT=fakeroot
fi

${FAKEROOT} emerge -q "$@"