Created
April 25, 2012 18:37
-
-
Save serbrech/2492064 to your computer and use it in GitHub Desktop.
This is how I bootstrap my envoironment. It's a small shellscript that will open a new tab and run the command past as argument to it.
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 | |
# Credits goes to http://stackoverflow.com/questions/1589114/opening-a-new-terminal-tab-in-osxsnow-leopard-with-the-opening-terminal-window#answer-7911097 | |
# I just slightly modified it to take an argument. | |
new_tab() { | |
pwd=`pwd` | |
osascript -e "tell application \"Terminal\"" \ | |
-e "tell application \"System Events\" to keystroke \"t\" using {command down}" \ | |
-e "do script \"cd $pwd; clear; $1;\" in front window" \ | |
-e "end tell" | |
> /dev/null | |
} | |
init(){ | |
new_tab mongod | |
new_tab "redis-server /usr/local/etc/redis.conf" | |
new_tab "foreman start" | |
new_tab spork | |
new_tab "rvmsudo passenger start -p 80 --user=<username>" | |
} | |
#BOOM! | |
init |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment