Created
January 2, 2016 14:22
-
-
Save sergio1990/ff8098fe9cfdaddea2e0 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/bash | |
PROJECT_NAME="<YOUR-PROJECT-NAME>" | |
PROJECT_PATH=" ~/Work/railsapps/${PROJECT_NAME}" | |
CD_INTO_PROJECT="cd ${PROJECT_PATH}" | |
tmux has-session -t $PROJECT_NAME | |
if [ $? != 0 ] | |
then | |
tmux new-session -s $PROJECT_NAME -n dev -d | |
tmux send-keys -t $PROJECT_NAME "${CD_INTO_PROJECT}" C-m | |
tmux split-window -h -t $PROJECT_NAME | |
tmux new-window -n tests -t $PROJECT_NAME | |
tmux send-keys -t $PROJECT_NAME:2 "${CD_INTO_PROJECT}" C-m | |
tmux select-window -t $PROJECT_NAME:1 | |
fi | |
tmux attach -t $PROJECT_NAME |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment