#!/usr/bin/sh

LD_LIBRARY_PATH="./lib:${LD_LIBRARY_PATH}" ldd phun.bin | grep "not found" > /dev/null 2>&1

if [ "$?" -eq "0" ]; then
  cat << _EOF_
  There are missing dependencies.
  Please make sure that all the required libraries are installed.
  Missing:
_EOF_
  LD_LIBRARY_PATH="./lib:${LD_LIBRARY_PATH}" ldd phun.bin | grep "not found" 
else
  LD_LIBRARY_PATH="./lib:${LD_LIBRARY_PATH}" ./phun.bin $@
fi

