#!/bin/sh -f

#
# File produced by the obuild tool version 1.0
# for the package bhep with version v1r4p2.
#

#////////////////////////////////////////////////
# Usage :
#   UNIX> cd some_path/pack/version/obuild
# ( UNIX> chmod a+x sh/broadcast_install )
#   UNIX> sh/broadcast_install
#
#////////////////////////////////////////////////

obuild_args="$*"

obuild_verbose=no

obuild_set_x=no
while test $# -ge 1 ; do
  case $1 in
    -v) obuild_verbose=yes ;;
    -x) obuild_set_x=yes ;;
    *) echo "unknown option : $1";exit ;;
  esac
  shift
done

if [ ${obuild_set_x} = yes ] ; then
  set -x
fi

# Binary directory is needed to create the obuild_find program.

if [  "${OBUILD_PLATFORM}" = "" ] ; then
  obuild_platform=`uname`
else
  obuild_platform=${OBUILD_PLATFORM}
fi

if [ "${obuild_platform}" = "" ] ; then
  echo "obuild_platform variable not defined."
  exit
fi

if [  "${OBUILD_DIR_BIN}" = "" ] ; then
  obuild_dir_bin=${obuild_platform}_obuild
else
  obuild_dir_bin=${OBUILD_DIR_BIN}
fi

if [ "${obuild_dir_bin}" = "" ] ; then
  echo "obuild_dir_bin variable not defined."
  exit
fi

obuild_bhep_path=..

# Create the bin directory :
/bin/mkdir -p "${obuild_bhep_path}/${obuild_dir_bin}"

if [ ! -e "${obuild_bhep_path}/obuild/sh/install" ] ; then
  echo "install script not found for package bhep."
  exit
fi
if [ ${obuild_verbose} = yes ] ; then
  echo "install setups of bhep"...
fi
cd "${obuild_bhep_path}/obuild"
./sh/install

