Skip to content

Instantly share code, notes, and snippets.

@AntsiferovMaxim
Created April 18, 2021 21:58
Show Gist options
  • Save AntsiferovMaxim/04f3735e376b900a019fd099a479f3a0 to your computer and use it in GitHub Desktop.
Save AntsiferovMaxim/04f3735e376b900a019fd099a479f3a0 to your computer and use it in GitHub Desktop.
set myList to {"target-folder"}
set baseUrl to "~/home/user/base-folder"
tell application "Terminal"
activate
do script "cd " & baseUrl & " && docker-compose up"
delay 15.0
repeat with theItem in myList
my makeTab()
set input to "\"\\033]0;" & theItem & "\\007\""
do script "echo -n -e " & input in selected tab of front window
do script "cd " & baseUrl & theItem in selected tab of front window
do script "yarn start:dev" in selected tab of front window
end repeat
end tell
on makeTab()
tell application "System Events" to keystroke "t" using {command down}
delay 1.0
end makeTab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment