
インストールしたいRubyバージョンを選択するだけで、インストールに必要なコマンドをまとめて叩くAppleScriptです。
/Applications/AppleScript Editor.appを起動して、コピペして実行してください。
display dialog "Please select version" buttons {"ree", "1.9.2", "Other"}
set myVersion to button returned of result
if myVersion is "Other" then
display dialog "Please input version" default answer "1.9.2"
set myVersion to button returned of result
end if
set myCommands to "!/bin/bash" & (ASCII character 10) & "curl -L get.rvm.io | bash -s -- --version latest" & (ASCII character 10) & "echo '[[ -s \"$HOME/.rvm/scripts/rvm\" ]] && . \"$HOME/.rvm/scripts/rvm\" # Load RVM function' >> ~/.bash_profile" & (ASCII character 10) & "source ~/.bash_profile" & (ASCII character 10) & "rvm pkg install readline" & (ASCII character 10) & "rvm pkg install iconv" & (ASCII character 10) & "rvm pkg install zlib" & (ASCII character 10) & "rvm pkg install openssl" & (ASCII character 10) & "rvm pkg install autoconf" & (ASCII character 10) & "rvm install " & myVersion & " --with-openssl-dir=$rvm_path/usr --with-iconv-dir=$rvm_path/usr --with-zlib-dir=$rvm_path/usr --with-readline-dir=$rvm_path/usr"
set scriptFileName to "/tmp/rvm_installer.sh"
do shell script "echo " & quoted form of myCommands & " > " & scriptFileName
tell application "Terminal"
do script with command "bash " & scriptFileName
end tell