-
-
Save mpapis/6391211 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
if | |
__system_and_version_is SunOS 5.10 | |
then | |
if __rvm_which sudo >/dev/null 2>&1 | |
then sudo_path="" | |
else sudo_path=/opt/csw/bin/ | |
fi | |
else | |
sudo_path="" | |
fi | |
if | |
__rvm_which ${sudo_path}sudo >/dev/null 2>&1 | |
then | |
command_to_run=( ${sudo_path}sudo -p "%p password required for '${command_to_run[*]}': " "${command_to_run[@]}" ) | |
else | |
rvm_requiremnts_fail error "Running '$*' would require sudo, but 'sudo' is not found in PATH!" | |
return 1 | |
fi | |
if | |
__system_and_version_is SunOS 5.10 && | |
! __rvm_which sudo >/dev/null 2>&1 | |
then | |
sudo_path=/opt/csw/bin/ | |
else | |
sudo_path="" | |
fi | |
if | |
__rvm_which ${sudo_path}sudo >/dev/null 2>&1 | |
then | |
command_to_run=( ${sudo_path}sudo -p "%p password required for '${command_to_run[*]}': " "${command_to_run[@]}" ) | |
else | |
rvm_requiremnts_fail error "Running '$*' would require sudo, but 'sudo' is not found in PATH!" | |
return 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment