Skip to content

Instantly share code, notes, and snippets.

@dmitriy-sqrt
Last active February 20, 2019 12:37
Show Gist options
  • Save dmitriy-sqrt/f683c65e9aa9e66f56e015d5c080abb8 to your computer and use it in GitHub Desktop.
Save dmitriy-sqrt/f683c65e9aa9e66f56e015d5c080abb8 to your computer and use it in GitHub Desktop.
#!/bin/bash
# run services required for ph work
tab_titles=(\
"ph-core"
"ph-admin"
"ph-web"
"sidekiq"
"opstool-front"
)
commands=(\
"cd ph-core && bundle exec rails s -p3001"
"cd ph-admin && rvm use 2.4.1 && bundle exec rails s"
"cd ph-web && npm run dev:backend"
"cd ph-core && bundle exec sidekiq"
"cd operations && npm run serve:plusstidhome"
)
# echo $commands
for i in ${!commands[@]};
do
cmd=${commands[$i]}
tab_title=${tab_titles[$i]}
# echo " mate-terminal --tab -e \"zsh --login -ic \"$cmd\" && read\""
# 'exec zsh' - to leave tab open after command termination
mate-terminal --tab -e "zsh --login -ic \"$cmd ; exec zsh\"" -t $tab_title
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment