#!/bin/sh
##########################################################################
##                                                                      ##
## installes selected packages                                          ##
## copylefted by Timo Benk <t_benk@users.sourceforge.net>               ##
##                                                                      ##
##########################################################################

. ../config_build
. ../"$SCRIPTS"/misc/lib/lib_fail

./pkg_update_ips || fail

export LC_CTYPE="C"
export LANGUAGE="C"
export LC_ALL="C"
export LANG="C"

if ! [ "$1" ]; then
    cat <<EOF
Usage: $0 PACKAGENAME PACKAGENAME...
installs the selected packages. Maybe you need to mount proc at 
_system/_cd/proc to succesfully install all packages.

Important: This script should only be called out of the utils
directory.
EOF
    exit 1
fi


chroot ../$ROOTFS /usr/bin/apt-get update
chroot ../$ROOTFS /usr/bin/apt-get install $@
chroot ../$ROOTFS /usr/bin/apt-get clean

