#!/bin/csh -f

# Harpoon directory under SHARC_HOME
set hrp_dir = harpoon
set exe_name = hardware_inventory

# Verify that SHARC_HOME is set
#----------------------------
if ($?SHARC_HOME) then
  echo "Using SHARC_HOME = "$SHARC_HOME""
else
  echo ""
  echo "The SHARC_HOME environment variable"
  echo "must be set before you can run Harpoon"
  echo ""
  exit
endif

# Verify that SHARC_ARCH is set
#----------------------------
if (! $?SHARC_ARCH) then
  setenv SHARC_ARCH `"$SHARC_HOME"/bin/sharc_arch`
endif
echo "Using SHARC_ARCH = $SHARC_ARCH"

set exe_dir="$SHARC_HOME"/$hrp_dir/machines/$SHARC_ARCH

# Start glx_info
#---------------

if ( ! -d "$exe_dir" || ! -x "$exe_dir"/$exe_name ) then
   echo "\nError: not able to execute: "
   echo "    "$exe_dir"/$exe_name"
   echo "Please check to make sure that SHARC_ARCH is correct for this"
   echo "machine, that the directory exists, and that you have permission"
   echo "to execute the applications in this directory.\n"
endif

"$exe_dir"/$exe_name $*:q
