PLEASE HELP Bash

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

PLEASE HELP Bash Thu Dec 18, 2014 5:40 pm • by MrLovemelt
Hello, I really need to figure this out, I have been running this forum for a while now and cant seem to figure it out...

I have a simple bash script that works fine in terminal when I use it with the filepath but hazel simply does not work... This is the error I get in the Hazel log:

2014-12-18 15:33:32.532 hazelworker[14708] Exception caught while executing shell script: launch path not accessible
2014-12-18 15:33:32.532 hazelworker[14708] [Error] Shell script failed: Error processing shell script on file /Users/MrLovemelt/Movies/INPUTGIF/sd.mov.
2014-12-18 15:33:32.532 hazelworker[14708] Shellscript exited with non-successful status code: -900


This is my bash script:

do
/usr/local/Cellar/ffmpeg/2.5/bin/ffmpeg -i $1 -vf scale=400:-1 -r 10 -f image2pipe -vcodec ppm - | /opt/local/bin/convert -delay 5 -loop 0 - output.gif
done

Ive added the paths of ffmpeg and convert as it is recommended on certain threads in here that it may be the culprit of it not working.... one idea I have is to somehow find the path for image2pipe, but cant determine its path.

what can I do?
MrLovemelt
 
Posts: 2
Joined: Thu Dec 18, 2014 5:27 pm

Re: PLEASE HELP Bash Fri Dec 19, 2014 4:51 pm • by Mr_Noodle
Is this an embedded script or external one? If embedded, make sure you specified a valid shell. If an external script, if you renamed or moved it, you may need to re-set it on your rule.
Mr_Noodle
Site Admin
 
Posts: 11866
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: PLEASE HELP Bash Sun Dec 21, 2014 7:31 pm • by MrLovemelt
It is embedded, and the shell is "bin/bash"

If I did it as an external script, would $1 still carry the file?
MrLovemelt
 
Posts: 2
Joined: Thu Dec 18, 2014 5:27 pm

Re: PLEASE HELP Bash Mon Dec 22, 2014 5:15 pm • by Mr_Noodle
Are you missing the / at the beginning of the shell path? If so, you really need that there or else nothing will work. And yes, $1 is the same regardless of how the script is executed.
Mr_Noodle
Site Admin
 
Posts: 11866
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support