I've read as much as I can find about using full path names to commands etc and the fact that Hazel runs the command in a non-interactive terminal, but I can't get my command to run. I'm trying to get Hazel to run a "make HTML" command so that when any restructured text file in a directory is modified, my Sphinx Python documentation website gets rebuilt.
In I terminal window I do this...
- Code: Select all
#cd Documents/sphinks_astun
make html
...and all works fine...the make command operates on a makefile in the sphinks_astun directory and all is fine.
In Hazel, I've set it to run an external shell script when any of the files are changed. I've altered the script to add full path names, so my shell script is like this...
- Code: Select all
#!/bin/bash
#cd /Users/myname/Documents/sphinks_astun
/usr/bin/make html
When Hazel tries to process the rule though I just get "shell script exited with non-successful status code:2"
Any help would be appreciated. (new to Hazel and shell scripts!!)