cygwin 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. #!/usr/bin/env bash
  2. requirements_cygwin_lib_installed()
  3. {
  4. cygcheck -c -d | __rvm_grep "^$1" >/dev/null || return $?
  5. }
  6. requirements_cygwin_libs_install()
  7. {
  8. \typeset __packages_list __manager
  9. rvm_debug "__manager: detecting administrative permissions"
  10. net session > /dev/null 2>&1
  11. if [ $? -eq 0 ];
  12. then __manager_admin_mode=""
  13. else __manager_admin_mode="--no-admin"
  14. fi
  15. if [[ "${_system_arch}" == "x86_64" ]]
  16. then __manager="setup-x86_64.exe"
  17. else __manager="setup-x86.exe"
  18. fi
  19. rvm_debug "__manager: ${__manager} ${__manager_admin_mode}"
  20. __packages_list="$*"
  21. ${__manager} ${__manager_admin_mode} -q -P "${__packages_list// /,}" || return $?
  22. }
  23. requirements_cygwin_update_system()
  24. {
  25. true # really???
  26. }
  27. requirements_cygwin_define()
  28. {
  29. # Verify cygwin package names using:
  30. # https://cygwin.com/cgi-bin2/package-grep.cgi
  31. case "$1" in
  32. (rvm)
  33. requirements_check bash curl patch gnupg
  34. ;;
  35. (jruby*)
  36. requirements_check make
  37. if
  38. is_head_or_disable_binary "$1"
  39. then
  40. requirements_check git
  41. case $( jruby_installation_method "$1" ) in
  42. ant) echo "Need Java JDK and Ant" ;;
  43. mvn) echo "Need Java JDK and Maven" ;;
  44. mvnw) echo "Need Java JDK" ;;
  45. esac
  46. else
  47. echo "Need Java"
  48. fi
  49. ;;
  50. (ir*)
  51. true # should be already there in most cases
  52. ;;
  53. (opal)
  54. echo "Need Node.js"
  55. ;;
  56. (*-head)
  57. requirements_check autoconf git
  58. requirements_cygwin_define "${1%-head}"
  59. ;;
  60. (*)
  61. requirements_check make autoconf automake bison m4 libtool \
  62. gcc gcc-core mingw64-i686-gcc-core mingw64-x86_64-gcc-core \
  63. libiconv zlib zlib-devel \
  64. openssl libssl-devel \
  65. libcrypt-devel libcrypt0 \
  66. libyaml-devel libyaml0_2 \
  67. libffi-devel \
  68. libreadline-devel \
  69. sqlite3 \
  70. patch \
  71. gnupg
  72. ;;
  73. esac
  74. }