add possibility to run ./run-osx.sh without iterm

This commit is contained in:
Roman Volosovskyi 2017-07-03 12:03:01 +03:00
parent 93889722fe
commit 27536e55fe
1 changed files with 8 additions and 1 deletions

View File

@ -16,6 +16,8 @@ function tab () {
cmd="; $args"
fi
iterm_exists=`osascript -e "id of application \"iterm2\""`
if [ ! -z iterm_exists ]; then
osascript &>/dev/null <<EOF
tell application "iTerm2"
tell current window
@ -28,6 +30,11 @@ function tab () {
end tell
end tell
EOF
else
osascript &>/dev/null <<END
tell app "Terminal" to do script "cd \"$cdto\"$cmd"
END
fi
}
if [ ! -z $1 ]
@ -54,7 +61,7 @@ open -a /Applications/Genymotion.app/Contents/MacOS/player.app --args --vm-name
fi
# Install deps, prepare for genymotion and figwheel
lein deps && re-natal deps && re-natal use-android-device "${device_type}" && re-natal use-figwheel
lein deps && ./re-natal deps && ./re-natal use-android-device "${device_type}" && ./re-natal use-figwheel
# open figwheel in new tab
tab "BUILD_IDS=${cljs_build} lein repl"