Skip to content

Instantly share code, notes, and snippets.

@whoisryosuke
Created July 15, 2021 19:28
Show Gist options
  • Select an option

  • Save whoisryosuke/f4620e383ee4929d6f35a0bf96ad0d26 to your computer and use it in GitHub Desktop.

Select an option

Save whoisryosuke/f4620e383ee4929d6f35a0bf96ad0d26 to your computer and use it in GitHub Desktop.
Bash/Mac - Open new Terminal window for each command (e.g. 2 CLI scripts that need to stay running)
#!/bin/sh
parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
osascript -e 'tell app "Terminal"
do script "cd '$parent_path' && cd ../first-app && yarn start"
end tell'
osascript -e 'tell app "Terminal"
do script "cd '$parent_path' && cd ../second-app && yarn start"
end tell'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment