Automator action "Run Shell Script" input
I have a simple shell script which puts away files which are added to a directory. It is set up as a Folder Action/ Automator workflow. You'll notice that I've explicitly named the directory and put it in a variable "root_directory". This works fine, but…
I'd like to make the script portable so that it works on whatever folder it's attached to without me having to explicitly name the directory, but I can't work out how to pass the directory path in to the script.
My guess is that it has something to do with the Pass input: setting, but this contains the actual filenames rather than the directory.
Can anyone point me to a solution?