Created
December 15, 2015 14:35
-
-
Save justinabrahms/535c568b8081645770c7 to your computer and use it in GitHub Desktop.
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 | |
# Originally from https://gist.github.com/dmkash/2355219 | |
SESSION_NAME="ccxcon" | |
cd ~/src/github.com/mitodl/ccxcon | |
tmux has-session -t ${SESSION_NAME} | |
if [ $? != 0 ] | |
then | |
# Create the session | |
tmux new-session -s ${SESSION_NAME} -n docker -d | |
# tp-docker && ccx-docker (1) | |
tmux send-keys -t ${SESSION_NAME}:1 'docker-compose up' C-m | |
tmux split-window -v -t ${SESSION_NAME}:1 | |
tmux send-keys -t ${SESSION_NAME}:1.1 'cd ../teachersportal/ && docker-compose up' C-m | |
# First window (2) -- emacs | |
tmux new-window -n emacs -t ${SESSION_NAME} | |
tmux send-keys -t ${SESSION_NAME} 'emacsclient -t' C-m | |
# ccx-shell (3) | |
tmux new-window -n ccxcon.sh -t ${SESSION_NAME} | |
tmux send-keys -t ${SESSION_NAME} 'git status' C-m | |
# tp-shell (4) | |
tmux new-window -n tp.sh -t ${SESSION_NAME} | |
tmux send-keys -t ${SESSION_NAME} 'cd ../teachersportal/ && git status' C-m | |
# edx-runserver | |
tmux new-window -n edx:runserver -t ${SESSION_NAME} | |
tmux send-keys -t ${SESSION_NAME} 'cd ../../edx/edx-platform/ && vagrant ssh && sudo su edxapp && paver run_all_servers --fast' | |
# edx | |
tmux new-window -n edx -t ${SESSION_NAME} | |
tmux send-keys -t ${SESSION_NAME} 'cd ../../edx/edx-platform/ && git status' | |
# Start out on the first window when we attach | |
tmux select-window -t ${SESSION_NAME}:2 | |
fi | |
tmux attach -t ${SESSION_NAME} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment