#!/bin/sh
prefix="/opt/local"
exec_prefix="${prefix}"
ncc_lib="${exec_prefix}/lib/ncc"

if [ $# -ne 1 ]; then
  echo "Usage: $0 <xml wiring file>"
  exit 2
fi

# set class path to the nesC java code
CLASSPATH=$ncc_lib/nesc.jar
if cygpath -w / 2> /dev/null >/dev/null; then
  # cygwin
  CLASSPATH=`cygpath -w $CLASSPATH`
fi
export CLASSPATH

java net.tinyos.nesc.wiring.WiringCheck <$1
