1
0

adkprepare.sh 1.3 KB

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