run-dev0 492 B

12345678910111213141516171819202122232425
  1. #!/bin/sh
  2. # ulimit -s 32000
  3. # ulimit -a
  4. rn=`readlink -f "${0}"`
  5. standardDir=`dirname "${rn}"`
  6. useDir=`readlink -f .`
  7. os=`uname -s`
  8. if [ "$os" = "Linux" ]; then
  9. exe="dev0lin"
  10. elif [ "$os" = "OpenBSD" ]; then
  11. exe="dev0obsd"
  12. elif [ "$os" = "FreeBSD" ]; then
  13. exe="dev0fbsd"
  14. else
  15. echo "unsupported OS"
  16. fi
  17. # export LD_DEBUG=all
  18. exec env \
  19. BB_STANDART_DIR="${standardDir}" BB_USE_DIR="${useDir}" \
  20. BB_PACKED_NAME="${exe}" BB_PACKED_FIRST= \
  21. "${standardDir}"/${exe} "${@}"