1
0

adkprepare.sh 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #!/bin/sh
  2. # This file is part of the OpenADK project. OpenADK is copyrighted
  3. # material, please see the LICENCE file in the top-level directory.
  4. os=$(uname)
  5. ver=$(uname -r)
  6. arch=$(uname -m)
  7. linux() {
  8. echo "Preparing Linux for OpenADK is not implemented, yet"
  9. exit 1
  10. }
  11. darwin() {
  12. echo "Preparing MacOS X for OpenADK, is not implemented, yet"
  13. exit 1
  14. }
  15. openbsd() {
  16. echo "Preparing OpenBSD for OpenADK"
  17. PKG_PATH="ftp://ftp.openbsd.org/pub/OpenBSD/${ver}/packages/${arch}/"
  18. export PKG_PATH
  19. pkg_add -v gmake
  20. pkg_add -v bash
  21. pkg_add -v wget
  22. pkg_add -v gtar--
  23. pkg_add -v gawk
  24. pkg_add -v gsed
  25. }
  26. netbsd() {
  27. echo "Preparing NetBSD for OpenADK"
  28. PKG_PATH="ftp://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/${arch}/${ver}/All/"
  29. export PKG_PATH
  30. pkg_add -vu gmake
  31. pkg_add -vu bash
  32. pkg_add -vu wget
  33. pkg_add -vu gtar
  34. pkg_add -vu gsed
  35. pkg_add -vu gawk
  36. }
  37. freebsd() {
  38. echo "Preparing FreeBSD for OpenADK"
  39. pkg_add -r gmake bash wget gtar gsed gawk
  40. }
  41. case $os in
  42. Linux)
  43. linux
  44. ;;
  45. FreeBSD)
  46. freebsd
  47. ;;
  48. OpenBSD)
  49. openbsd
  50. ;;
  51. NetBSD)
  52. netbsd
  53. ;;
  54. Darwin)
  55. darwin
  56. ;;
  57. *)
  58. echo "OS not supported"
  59. ;;
  60. esac