Created
February 2, 2012 17:36
-
-
Save pavellishin/1724780 to your computer and use it in GitHub Desktop.
Start up my dev environment, yo.
This file contains hidden or 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
#! /usr/bin/env bash | |
start_cmd="sudo -p 'Enter password to launch XAMPP: ' /Applications/XAMPP/xamppfiles/xampp restart;\ | |
sudo /Applications/XAMPP/xamppfiles/xampp stopftp;\ | |
sudo /Applications/XAMPP/xamppfiles/xampp startmemcached;\ | |
tmux select-window -t netomat:code | |
" | |
dir_ms="/Users/pavel/Documents/netomat/mobilityserver" | |
dir_msa="/Users/pavel/Documents/netomat/msadmin" | |
dir_xampp="/Applications/XAMPP/xamppfiles" | |
# Start session. | |
tmux new-session -d -s netomat -n 'xampp' | |
tmux send-keys -t netomat:xampp "cd $dir_xampp" C-m | |
# By default, stay in the code directory | |
tmux set-option -t netomat default-path "$dir_ms" | |
# Split the code window into ms and msadmin | |
tmux new-window -d -n 'code' | |
tmux split-window -v -l 5 -t netomat:code | |
tmux send-keys -t netomat:code "cd $dir_msa; clear" C-m | |
tmux select-pane -U -t netomat:code | |
# Start tailing logs. | |
tmux new-window -d -n 'logs' | |
tmux send-keys -t netomat:logs "tail -f $dir_ms/log/*.log" C-m | |
tmux split-window -v -l 20 -t netomat:logs | |
tmux send-keys -t netomat:logs "tail -f $dir_msa/log/*.log" C-m | |
tmux split-window -v -l 10 -t netomat:logs | |
tmux send-keys -t netomat:logs "tail -f $dir_xampp/logs/error_log" C-m | |
tmux select-pane -U -t netomat:logs | |
tmux select-pane -U -t netomat:logs | |
# Start XAMPP | |
tmux select-window -t netomat:xampp | |
tmux send-keys -t netomat:xampp "$start_cmd" C-m |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment