Created
October 26, 2022 14:09
-
-
Save matschaffer/9615dc3b60b7ada90303d976d7985fd5 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
if application "iTerm" is running then | |
tell application "iTerm" | |
create window with default profile | |
end tell | |
else | |
activate application "iTerm" | |
end if | |
tell application "iTerm" | |
tell current window | |
tell current session | |
write text "cd ~/elastic/kibana" | |
write text "git checkout main" | |
write text "git pull" | |
write text "yarn kbn bootstrap" | |
end tell | |
-- watch for bootstrap complete | |
set a to 0 | |
repeat until (a = 1) | |
if (text of current session contains "Done in") then | |
set a to 1 | |
end if | |
end repeat | |
-- start ES | |
tell current session | |
write text "yarn es snapshot --license trial" | |
end tell | |
set a to 0 | |
repeat until (a = 1) | |
if (text of current session contains "kbn/es setup complete") then | |
set a to 1 | |
end if | |
end repeat | |
-- split tab horizontally to run kibana below | |
tell current session | |
split horizontally with default profile | |
end tell | |
-- start kibana | |
tell last session of last tab | |
write text "cd ~/elastic/kibana" | |
write text "yarn start" | |
end tell | |
end tell | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment