Created
August 15, 2013 10:51
-
-
Save Ch00k/6239969 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| case "$(uname)" in | |
| (SunOS) | |
| [[ -x /usr/gnu/bin/grep || -x /opt/local/bin/grep ]] || | |
| rvm_error "ERROR: Missing GNU grep. Make sure it is installed in either /usr/gnu/bin/grep or /opt/local/bin/grep before using RVM!" | |
| __rvm_grep() | |
| { | |
| GREP_OPTIONS="" /usr/gnu/bin/grep "$@" || | |
| GREP_OPTIONS="" /opt/local/bin/grep "$@" || return $?; | |
| } | |
| for gnu_util in "${gnu_utils[@]}" | |
| do | |
| [[ -x /usr/gnu/bin/$gnu_util || -x /opt/local/bin/$gnu_util ]] || | |
| rvm_error "ERROR: Missing GNU $gnu_util. Make sure it is installed in either /usr/gnu/bin/$gnu_util or /opt/local/bin/$gnu_util before using RVM!" | |
| eval "__rvm_$gnu_util() { /usr/gnu/bin/$gnu_util \"\$@\" || /opt/local/bin/$gnu_util \"\$@\" || return \$?; }" | |
| done | |
| ;; | |
| (*) | |
| __rvm_grep() | |
| { | |
| GREP_OPTIONS="" \grep "$@" || return $? | |
| } | |
| for gnu_util in "${gnu_utils[@]}" | |
| do | |
| eval "__rvm_$gnu_util() { \\$gnu_util \"\$@\" || return \$?; }" | |
| done | |
| ;; | |
| esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment