Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /bin/zsh
- # $PROJECTDIR is set in .zshrc/bash_profile
- FIRSTDIR="$PROJECTDIR/first"
- SECONDDIR="$PROJECTDIR/second"
- # starts a tmux session using iTerm's tmux mode
- # opens a new tab for each service and ensures that the name won't get overridden
- # runs the servers/queues/processes for each service
- # sends the command but doesn't run it for services I don't need all the time
- tmux -CC \
- set-option -g allow-rename off \; \
- new-session -n "FIRST" \; \
- send-keys "cd $FIRSTDIR && start the server" C-m \; \
- split-window -h \; \
- send-keys "cd $FIRSTDIR && start the queue server" \; \
- split-window -v \; \
- send-keys "cd $FIRSTDIR && start the helper service" C-m \; \
- new-window -n "SECOND" \; \
- send-keys "cd $SECONDDIR && start the server" C-m \; \
- split-window -h \; \
- send-keys "cd $SECONDDIR && start the queue server" C-m \; \
- split-window -v \; \
- send-keys "cd $SECONDDIR && start webpack/the asset service" \;
Add Comment
Please, Sign In to add comment