Last active
August 29, 2015 14:07
-
-
Save juanignaciosl/34fd83cbf9d28281886b to your computer and use it in GitHub Desktop.
tmux cartodb workspace
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/bash | |
SESSIONNAME="cartodb_workspace" | |
tmux has-session -t $SESSIONNAME &> /dev/null | |
if [ "$?" != "0" ]; then | |
tmux new-session -s $SESSIONNAME -n script -d | |
tmux split-window -h -t $SESSIONNAME -t 0 | |
tmux split-window -h -t $SESSIONNAME -t 1 | |
tmux split-window -v -t $SESSIONNAME -t 0 | |
tmux split-window -v -t $SESSIONNAME -t 1 | |
tmux split-window -v -t $SESSIONNAME -t 2 | |
tmux split-window -v -t $SESSIONNAME -t 2 | |
tmux send-keys -t 0 "cd /vagrant && bundle exec rails s -p 3000" C-m | |
tmux send-keys -t 3 "cd /cartodb-central && bundle exec rails s -p 4000" C-m | |
tmux send-keys -t 6 "cd /vagrant && redis-server" C-m | |
tmux send-keys -t 1 "cd /vagrant && bundle exec script/resque" C-m | |
tmux send-keys -t 4 "cd /cartodb-central && bundle exec script/resque" C-m | |
tmux send-keys -t 2 "cd /Windshaft-cartodb && node app.js development" C-m | |
tmux send-keys -t 5 "cd /CartoDB-SQL-API; node app.js development" C-m | |
fi | |
tmux attach -t $SESSIONNAME |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment