I have written a bash script (in a separate file, not embedded into the Hazel rules) which does some image processing on files transferred from a tethered camera. I want Hazel to watch the folder that the files are being transferred to and when the number of files in the folder equals a certain amount, run the script.
The problem is that Hazel wants to run the script on every file in the folder, but the script is not written to use any arguments or input, as it does it's own file gathering and runs on 4 files together, not just 1 at a time.
The script returns an error "2013-10-16 21:26:31.144 hazelworker[3767] Shellscript exited with non-successful status code: 1" when triggered through Hazel, but works perfect when run once in the terminal.
Any ideas?