Created
April 18, 2021 21:58
-
-
Save AntsiferovMaxim/04f3735e376b900a019fd099a479f3a0 to your computer and use it in GitHub Desktop.
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
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