#!/bin/sh START_DIR=`pwd` export PGROUP=$1 shift while [ "$1" ]; do echo Building $1 if [ -d $PGROUP/$1 ]; then cd $PGROUP/$1 ./VBuild if [ ! $? = 0 ]; then echo "ERROR: buildpkg failed." exit 1 fi elif [ "$INSTALL_PKG" = "yes" ]; then if [ -f $PKG_DIR/$PGROUP/$1*.tgz ]; then echo Installing package $PKG_DIR/$PGROUP/$1 sudo /sbin/installpkg $PKG_DIR/$PGROUP/$1*.tgz else echo "ERROR: Could not install $1. Aborting" exit 1 fi else echo WARNING: $PGROUP/$1 is not exist fi cd $START_DIR shift done unset START_DIR