Skip to content

Instantly share code, notes, and snippets.

@matschaffer
Created October 26, 2022 14:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matschaffer/9615dc3b60b7ada90303d976d7985fd5 to your computer and use it in GitHub Desktop.
Save matschaffer/9615dc3b60b7ada90303d976d7985fd5 to your computer and use it in GitHub Desktop.
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