adkprepare.sh 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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 rsync--
  21. pkg_add -v git
  22. pkg_add -v bash
  23. pkg_add -v unzip
  24. pkg_add -v wget
  25. pkg_add -v gtar--
  26. pkg_add -v gawk
  27. pkg_add -v gsed
  28. pkg_add -v xz
  29. pkg_add -v lzop
  30. pkg_add -v intltool
  31. pkg_add -v screen--
  32. pkg_add -v vim--no_x11
  33. pkg_add -v py-libxml
  34. }
  35. netbsd() {
  36. echo "Preparing NetBSD for OpenADK"
  37. PKG_PATH="ftp://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/${arch}/${ver}/All/"
  38. export PKG_PATH
  39. pkg_add -vu xz
  40. pkg_add -vu scmgit
  41. pkg_add -vu gmake
  42. pkg_add -vu bash
  43. pkg_add -vu wget
  44. pkg_add -vu unzip
  45. pkg_add -vu gtar
  46. pkg_add -vu gsed
  47. pkg_add -vu gawk
  48. pkg_add -vu intltool
  49. pkg_add -vu vim
  50. pkg_add -vu screen
  51. pkg_add -vu mksh
  52. }
  53. freebsd() {
  54. echo "Preparing FreeBSD for OpenADK"
  55. pkg_add -r git gmake bash wget unzip gtar gsed gawk intltool screen mksh vim
  56. }
  57. case $os in
  58. Linux)
  59. linux
  60. ;;
  61. FreeBSD)
  62. freebsd
  63. ;;
  64. OpenBSD)
  65. openbsd
  66. ;;
  67. NetBSD)
  68. netbsd
  69. ;;
  70. Darwin)
  71. darwin
  72. ;;
  73. *)
  74. echo "OS not supported"
  75. ;;
  76. esac