Skip to content

Instantly share code, notes, and snippets.

@hissain
Created April 27, 2020 23:25
Show Gist options
  • Save hissain/adce060672792746d9373435dc622f3f to your computer and use it in GitHub Desktop.
Save hissain/adce060672792746d9373435dc622f3f to your computer and use it in GitHub Desktop.
#!/bin/bash
echo "This is simplest bash command"
#start of the apple script code
osascript <<'END'
set theAlertText to "Swiftlint is not installed"
set theAlertMessage to "Download from https://github.com/realm/SwiftLint manually. Would you like to open link?"
display alert theAlertText message theAlertMessage as critical buttons {"Cancel", "Open link"} default button "Open link" cancel button "Cancel" giving up after 60
set the button_pressed to the button returned of the result
if the button_pressed is "Open link" then
open location "https://github.com/realm/SwiftLint/blob/master/README.md"
end if
END
#end of the apple script code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment