#!/bin/bash

echo
echo "Recommended environment variables:"
echo

if [ `uname -s` = "Darwin" ]; then
  echo "export SLBM_ROOT=`pwd`"
  echo "export DYLD_LIBRARY_PATH=\${DYLD_LIBRARY_PATH}:\${SLBM_ROOT}/lib"
  echo "export PATH=\${SLBM_ROOT}/bin:\$PATH"
else
  echo "setenv SLBM_ROOT `pwd`"
  echo "setenv LD_LIBRARY_PATH \"\$LD_LIBRARY_PATH\":\$SLBM_ROOT/lib"
  echo "set path = ( \$SLBM_ROOT/bin \$path )"
fi

echo

echo "Creating executable script file bin/slbmtestjava"
echo "#!/bin/bash" > bin/slbmtestjava
echo "#" >> bin/slbmtestjava
echo "# The substring '-Xmx????m' in the following execution" >> bin/slbmtestjava
echo "# command specifies the amount of memory to make available" >> bin/slbmtestjava
echo "# to the application, in megabytes." >> bin/slbmtestjava
echo "#" >> bin/slbmtestjava
echo "java -Xmx1400m -jar `pwd`/bin/slbmtest.jar \$*" >> bin/slbmtestjava
chmod 777 bin/slbmtestjava

