#!/bin/sh 

if [ -z $BIP2_HOME ]; then  
  echo "BIP2_HOME environment variable is not set" 
  exit 255
fi

if [ -d $BIP2_HOME/bip-parts ]; then  

    unset LOCAL_CP

    BIP_PLUGINS=$BIP2_HOME/bip-parts
    EXTERNAL_PLUGINS=$BIP2_HOME/externals
    
    for plugin in $BIP_PLUGINS/*.jar $EXTERNAL_PLUGINS/*.jar; do
	LOCAL_CP="$LOCAL_CP:$plugin"
    done

    java -cp $CLASSPATH:$LOCAL_CP  ujf.verimag.bip.cmdline.CmdLine  $BIP_CMDLINE_JAR $* 
else
    echo "BIP2_HOME environment variable does not point to the bip distribution" 
    exit 255
fi
