#!/bin/sh
#
# Generate a usage report for waled2 log files.
#

### Be sure the appropriate environment variables are set
###

if test x$SHARC_HOME = 'x'; then
    echo "\$SHARC_HOME is not defined!"
    exit 1
fi

if test x$SHARC_ARCH = 'x'; then
    ARCH=`$SHARC_HOME/bin/sharc_arch`
else
    ARCH=$SHARC_ARCH
fi


if test ! -x $SHARC_HOME/license/machines/$ARCH/waled2_report; then
    echo "Cannot find or execute $SHARC_HOME/license/machines/$ARCH/waled2_report!"
    exit 1
fi


### Set the home directory of the license manager
###

LICDIR=$SHARC_HOME/license

### Run the report
###

$SHARC_HOME/license/machines/$ARCH/waled2_report "$@"
