Skip to content

Instantly share code, notes, and snippets.

@kazuph
Last active December 11, 2015 01:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kazuph/4523919 to your computer and use it in GitHub Desktop.
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だと正常に動かなかったので自分なりに修正
#!/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