Created
December 19, 2014 10:40
-
-
Save DavidHernandez/0a9e0bdbbc6fec0dc1a8 to your computer and use it in GitHub Desktop.
Start the my drupal dev environment
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 | |
PROJECT = $1 | |
tmux new-session -d -s $PROJECT | |
tmux new-window -t $PROJECT:1 -n 'Logs' ; | |
tmux split-window -h ; | |
tmux select-pane -L | |
tmux send-keys -t $PROJECT:1 'sudo tail -f /var/log/apache2/error.log' C-m | |
tmux select-pane -R | |
tmux send-keys -t $PROJECT:1 "cd ~/projects/$PROJECT && drush ws --tail" C-m | |
tmux new-window -t $PROJECT:2 -n 'code' "vi ~/code/$PROJECT" | |
tmux new-window -t $PROJECT:3 -n 'sql' "cd ~/projects/$PROJECT && drush sqlc" | |
tmux new-window -t $PROJECT:4 -n "$PROJECT" "cd ~/projects/$PROJECT/" | |
tmux new-window -t $PROJECT:5 -n 'dev' "ssh $PROJECT@${PROJECT}-dev" | |
tmux select-window -t $PROJECT:2 | |
tmux -2 attach-session -t $PROJECT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment