#!/bin/sh # (c) by Milan 't4c' Berger 2006 # thx to das.sh0! # # depcreated! Use newer Portage and ROOT= # # Distributed under the terms of the GNU General Public License v2 # # emerge packets to specified directory # change useflags and cflags before you use this! # # Usage: chrootmerge packet # Don't forget to set cflags! [ "$UID" -ne "0" ] && echo "Must be root to run this script." && exit # "exit with error"-function function die() { echo ${*}; exit 1; } # Check commandline for chroot dir and packet test -z "${1}" && die "Usage: ${0} UserDir packet" test -z "${2}" && die "Usage: ${0} UserDir packet" # set new root and packet root=${1} merge=${2} echo "user" ${1} "merge" ${2} export CFLAGS="-march=x86-64 -Os -pipe -fomit-frame-pointer" export CXXFLAGS="${CFLAGS}" export USE="minimal multical static -perl -pam -python" export INSTALL_MASK="*.c *.cc *.h *.a *.la *.x" export ROOT=${root} export FEATURES="noman nodoc noinfo" emerge -av ${merge}