# launcher
-
Shutdown and restart (automated dev env setup)
if [ $# -ne 1 ]; then PATHDIR=
</span><span class="nb">pwd</span><span class="sb">
else PATHDIR=$1 fi/usr/bin/osascript > /dev/null <<-EOF activate application "Terminal" tell application "System Events" keystroke "t" using {command down} end tell tell application "Terminal" repeat with win in windows try if get frontmost of win is true then do script "cd $PATHDIR; clear" in (selected tab of win) end if end try end repeat end tell EOF
# get the directory this script was launched from bindir=
</span>dirname <span class="nv">$0</span><span class="sb">
# open TextMate $bindir/termexec "cd $PATHDIR" $bindir/termexec "mate ."
$bindir/newtab $PATHDIR # for svn, git, etc.
# start Apache $bindir/newtab $PATHDIR $bindir/termexec "httpd -k restart -f $PATHDIR/dev_conf/localhost.conf"
# start PostgreSQL $bindir/newtab $PATHDIR # for postgres $bindir/termexec "$PATHDIR/bin/postgresql start"
# open Firefox open $FIREFOX –args $APP_URL
export FIREFOX APP_URL
bindir=
</span>dirname <span class="nv">$0</span><span class="sb">
$bindir/devapps "/Users/john/Workspace/demo/jobs"