shell script with growlnotify does nothing

i've been trying to figure out what's going wrong here for a few days, and have completely struck out. here's the scenario:
i have a rule that takes any text file on my desktop and automatically makes a symlink in my Dropbox folder. i want to make sure that when i delete one of those text files, the now-broken symlink gets deleted out of Dropbox. i found a one-line script that will trash any broken symlinks.
i wanted Hazel to give some indication that the symlink had been deleted (in case a link was broken accidentally, i'd want to know to restore it). i wanted to include the name of the symlink, but since that's not the matched file, i couldn't do it with a "Send Growl notification" action. instead, i added a call to growlnotify in my shell script.
this script works perfectly from the Terminal, but in my Growl rule it does…nothing. doesn't trigger the Growl notification, doesn't delete the symlink, doesn't throw an error, doesn't show up in the log…just. nothing. i've tried all kinds of sample scripts and it seems to happen in any script that calls growlnotify, even if it's a bare command, rather than a parameter of find.
so, uh, have i done something wrong? is there any workaround? or is this just an odd bug?
i have a rule that takes any text file on my desktop and automatically makes a symlink in my Dropbox folder. i want to make sure that when i delete one of those text files, the now-broken symlink gets deleted out of Dropbox. i found a one-line script that will trash any broken symlinks.
- Code: Select all
find -L ~/Dropbox -type l -exec rm {} \;
i wanted Hazel to give some indication that the symlink had been deleted (in case a link was broken accidentally, i'd want to know to restore it). i wanted to include the name of the symlink, but since that's not the matched file, i couldn't do it with a "Send Growl notification" action. instead, i added a call to growlnotify in my shell script.
- Code: Select all
find -L ~/Dropbox -type l -exec growlnotify -a ~/Library/PreferencePanes/Hazel.prefPane -m "$(basename {})" Broken symlink removed -s \; -exec rm {} \;
this script works perfectly from the Terminal, but in my Growl rule it does…nothing. doesn't trigger the Growl notification, doesn't delete the symlink, doesn't throw an error, doesn't show up in the log…just. nothing. i've tried all kinds of sample scripts and it seems to happen in any script that calls growlnotify, even if it's a bare command, rather than a parameter of find.
so, uh, have i done something wrong? is there any workaround? or is this just an odd bug?