#!/bin/sh # $Progeny$ # Copyright 2004 Progeny Linux Systems, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # Author: Branden Robinson PROGNAME=${0##*/} DEBUG= SHOW_LIST= trace () { if [ -n "$DEBUG" ]; then echo "$PROGNAME: debug: $*" >&2 fi } warn () { echo "$PROGNAME: warning: $*" >&2 } die () { echo "$PROGNAME: error: $*" >&2 exit 1 } usage () { cat <&2 fi eval set -- "$TEMP" while :; do case "$1" in -h|--help) usage exit 0 ;; -l|--list) SHOW_LIST=yes ;; -v|--verbose) DEBUG=yes ;; --) # End of option arguments. shift break ;; *) die "unrecognized option; use \"$PROGNAME --help\" for help" exit 2 ;; esac shift done case "$(uname -m)" in x86_64) RPMS=$(cat </dev/null 2>&1; then CHROOTDIR="$(pwd)/$CHROOTDIR" fi trace "Installing $* to $CHROOTDIR..." if ! rpm --install --root "$CHROOTDIR" $@; then die "command \"rpm --install --root $CHROOTDIR $*\"" \ "failed" fi fi PASSNUM=$(( $PASSNUM + 1 )) done # vim:set ai et nohlsearch sts=4 sw=4 tw=80: