run.sh 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #!/bin/sh
  2. # Part of Zombie Navigator
  3. # Copyright © 2016 Zombie Navigator Developers
  4. cd "`dirname "$0"`"
  5. make update
  6. cd ./src
  7. if [ -x "$1" ] && [ -f "$1" ] ; then
  8. JPM_FIREFOX_BINARY="$1"
  9. elif [ -x "$JPM_FIREFOX_BINARY" ] && [ -f "$JPM_FIREFOX_BINARY" ] ; then
  10. JPM_FIREFOX_BINARY="$JPM_FIREFOX_BINARY"
  11. elif which firefox >/dev/null 2>&1 ; then
  12. JPM_FIREFOX_BINARY="`which firefox`"
  13. elif [ -x "$HOME/.local/bin/firefox" ] ; then
  14. JPM_FIREFOX_BINARY="$HOME/.local/bin/firefox"
  15. elif [ -x "$HOME/bin/firefox" ] ; then
  16. JPM_FIREFOX_BINARY="$HOME/bin/firefox"
  17. elif [ -x "/usr/local/bin/firefox" ] ; then
  18. JPM_FIREFOX_BINARY="/usr/local/bin/firefox"
  19. elif [ -x "/usr/bin/firefox" ] ; then
  20. JPM_FIREFOX_BINARY="/usr/bin/firefox"
  21. elif [ -x "/Applications/Firefox.app/Contents/MacOS/firefox" ] ; then
  22. # OS/X
  23. JPM_FIREFOX_BINARY="/Applications/Firefox.app/Contents/MacOS/firefox"
  24. elif [ -x "$HOME/Applications/Firefox.app/Contents/MacOS/firefox" ] ; then
  25. # OS/X, per user
  26. JPM_FIREFOX_BINARY="$HOME/Applications/Firefox.app/Contents/MacOS/firefox"
  27. fi
  28. if [ "$JPM_FIREFOX_BINARY" ] ; then
  29. export JPM_FIREFOX_BINARY
  30. fi
  31. echo "Please ignore JPM warnings about the 'semver' (if any)" >&2
  32. echo "Because we use '~' for prereleases (for consistence with GNU/Linux conventions)" >&2
  33. if [ -t 1 ] ; then
  34. ../bin/run "$JPM_FIREFOX_BINARY" | egrep -v 'semver|^\s*$|semantic|versioning rules|values indicating major,|^"1\.4\.56"|^"0\.0\.1"$|^"1\.0\.0rc4"$'
  35. else
  36. ../bin/run "$JPM_FIREFOX_BINARY"
  37. fi
  38. # vim: ts=4 noet ai