Caveat: I'm completely new to Alfred Workflows, so this is probably a really basic set of questions...
Historically, I've created bash scripts to start and stop a variety of servers on my Macs which I use, in part, for Web application development. These servers might include virtual machines, different Tomcat instances, mail servers, etc. None of them run by default, and none run on low port numbers so none have to be started/stopped using elevated privileges. When I want to start or stop one or more of these servers, I open a terminal window and invoke my various bash scripts with needed arguments, etc.
I would now like to set up Alfred Workflows for this same sort of activity, so that I can eliminate the step of having to open the terminal window.
I've poked at the Alfred Workflows capability enough over the past couple days to figure out that I can get what I want in a variety of ways:
1. keyword/with space/argument required + Run NSAppleScript, where the AppleScript just invokes my existing bash scripts with the keyword arguments
2. keyword/with space/argument required + Run Script (/usr/bin/osascript), where the AppleScript again just invokes my existing bash scripts with the keyword arguments
3. keyword/with space/argument required + Run Script (/bin/bash), where I basically embed my existing bash script within the workflow and explode {query} to get the keyword argument available like the arguments I would provide to my existing bash scripts on the terminal command-line.
I've convinced myself all of these approaches would work.
My question is primarily related to the benefits and/or drawbacks of these different approaches: Are there performance differences or system impacts (speed, memory, other?) between these three approaches that I should consider in choosing one approach over the others? I understand, for instance, that the difference between 1 and 2 is that 1 runs on the Alfred thread, while 2 does not... but what does that mean in real terms for me and my system if the script takes a few seconds to complete? Does just embedding the bash script directly in the workflows help with efficiency/impact, as AppleScript is no longer in the picture?
Does any of this really matter?
Any insight and recommendations about the implications of the different approaches would be great.
Thanks in advance.
--
/ron