#!/bin/sh
# MANUAL COMPILE ONLY, NOT INSTALL

usage() {
cat <<EOF
bc - Build one or more tarball directories and install it

usage: bc <path-to-tarball-directory> 

Examples:
   bc src/cli/CORE/vasm2
   bc src/cli/CORE/*
EOF
}

if [ -z "$1" ] || [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
    usage
    exit 0
fi

. ./config.core

export OVERWRITE_PKG=yes
export INSTALL_PKG="no"
export INSTALL_HOST="yes"

CWD=`pwd`
while [ "$1" ]; do
    if [ -d $1 ] && [ "${1##*.}" != "bak" ]; then
	cd $1
	PLONG=`pwd`
	GLONG=`dirname $PLONG`
	GSHORT=${GLONG#$TAR_BASE/}
	install-group $GSHORT `basename $1`
    	cd $CWD
    fi
    shift
done
