Created
August 15, 2013 15:41
-
-
Save Ch00k/6241892 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) | |
| case "$(uname -v)" in | |
| (*joyent*) | |
| gnu_tools_path=/opt/local/bin | |
| ;; | |
| (*) | |
| gnu_tools_path=/usr/gnu/bin | |
| ;; | |
| esac | |
| [[ -x $gnu_tools_path/grep ]] || | |
| rvm_error "ERROR: Missing GNU grep. Make sure it is installed in $gnu_tools_path/grep before using RVM!" | |
| __rvm_grep() | |
| { | |
| GREP_OPTIONS="" $gnu_tools_path/grep "$@" || return $?; | |
| } | |
| for gnu_util in "${gnu_utils[@]}" | |
| do | |
| [[ -x $gnu_tools_path/$gnu_util ]] || | |
| rvm_error "ERROR: Missing GNU $gnu_util. Make sure it is installed in $gnu_tools_path/$gnu_util before using RVM!" | |
| eval "__rvm_$gnu_util() { $gnu_tools_path/$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