adkprepare.sh 926 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #!/bin/sh
  2. while getopts "e" option
  3. do
  4. case $option in
  5. e) ext=1 ;;
  6. *) printf "Option not recognized\n";exit 1 ;;
  7. esac
  8. done
  9. shift $(($OPTIND - 1))
  10. linux() {
  11. echo "Preparing Linux for OpenADK"
  12. }
  13. darwin() {
  14. echo "Preparing MacOS X for OpenADK"
  15. }
  16. openbsd() {
  17. echo "Preparing OpenBSD for OpenADK"
  18. }
  19. netbsd() {
  20. echo "Preparing NetBSD for OpenADK"
  21. }
  22. freebsd() {
  23. echo "Preparing FreeBSD for OpenADK"
  24. pkg_add -r git gmake mksh bash wget unzip gtar gsed gawk
  25. }
  26. freebsd_full() {
  27. echo "Preparing FreeBSD for full OpenADK package builds"
  28. pkg_add -r intltool lynx bison zip xkbcomp glib20 libIDL
  29. }
  30. os=$(uname)
  31. case $os in
  32. Linux)
  33. linux
  34. [[ $ext -eq 1 ]] && linux_full
  35. ;;
  36. FreeBSD)
  37. freebsd
  38. [[ $ext -eq 1 ]] && freebsd_full
  39. ;;
  40. OpenBSD)
  41. openbsd
  42. [[ $ext -eq 1 ]] && openbsd_full
  43. ;;
  44. NetBSD)
  45. netbsd
  46. [[ $ext -eq 1 ]] && netbsd_full
  47. ;;
  48. Darwin)
  49. darwin
  50. [[ $ext -eq 1 ]] && darwin_full
  51. ;;
  52. esac