Last active
December 11, 2015 01:29
-
-
Save kazuph/4523919 to your computer and use it in GitHub Desktop.
https://github.com/haraken3/SublimeRubyMotionBuilder/blob/master/rubymotion_run.sh
がMac OS X 10.7.5だと正常に動かなかったので自分なりに修正
This file contains 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
#!/bin/sh | |
TERMINAL_ID="RubyMotionBuilder" | |
PROJECT_DIR="$1" | |
OPTIONS="$2" | |
if [ "${PROJECT_DIR}" = "" ]; then | |
exit 1 | |
fi | |
osascript<<END | |
try | |
tell application "Terminal" | |
activate | |
try | |
do script "quit" in front window | |
do script "cd \"${PROJECT_DIR}\"" in front window | |
on error | |
do script "alias quit='' && cd \"${PROJECT_DIR}\" && clear" | |
end try | |
delay 0.9 | |
do script "rake ${OPTIONS}" in front window | |
end tell | |
end try | |
END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment