Minor: couple more usability tweaks to the runnodes script

This commit is contained in:
Mike Hearn 2016-11-17 18:49:40 +01:00
parent 81d6195a07
commit 010112e44e

View File

@ -4,6 +4,10 @@
set -euo pipefail
export CAPSULE_CACHE_DIR=cache
# Allow the script to be run from outside the nodes directory.
basedir=$( dirname "$0" )
cd "$basedir"
if which osascript >/dev/null; then
# MacOS X: open each node in a in new tab.
first=true
@ -15,13 +19,12 @@ if which osascript >/dev/null; then
script="$script
tell application \"System Events\" to tell process \"Terminal\" to keystroke \"t\" using command down
delay 0.5
do script \"cd $rootdir/$dir; java -jar JAR_NAME; exit\" in window 1"
do script \"cd $rootdir/$dir; java -jar JAR_NAME && exit\" in window 1"
first=false
fi
done
script="$script
end tell"
echo "$script"
osascript -e "$script"
else
# Some other UNIX, probably Linux