Shell script problem

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

Moderator: Mr_Noodle

Shell script problem Thu Jun 05, 2014 1:33 pm • by trendykendy
Hello!
So I've been using hazel for awhile to run a shell script that uses FileBot's command line tools to match TV shows and movies. This was working fine until the last FileBot update, but now it's broken :cry: .

The script is this (running in bin/bash):

Code: Select all
Applications/FileBot.app/Contents/MacOS/filebot.sh -script fn:amc "/Volumes/Data HD/Downloads/Movies to Move" --output "/Volumes/Media 2/Movies" --conflict override -non-strict --def artwork=n forceMovie=y "movieFormat={n} ({y})"


The only things that changed is that changed are:
1. FileBot now needs Java 1.8.0 to run (that took a while to figure out but is now sorted) and
2. The path to the script used to be Applications/FileBot.app/Contents/MacOS/filebot, but is now Applications/FileBot.app/Contents/MacOS/filebot.sh (the .sh is the only change)

The script runs in terminal when I cd to the root level of the hard drive, but now matter what I try I can't get Hazel to run it, I just get this error:

Code: Select all
Exception caught while executing shell script: launch path not accessible
2014-06-05 18:16:53.200 hazelworker[484] [Error] Shell script failed: Error processing shell script on file /Volumes/Data HD/Downloads/Movies to Move/Saw IV (2007).mkv.
2014-06-05 18:16:53.200 hazelworker[484] Shellscript exited with non-successful status code: -900


I assume for reason that adding the .sh to the file path now requires me to cd to the root level but I've tried
Code: Select all
cd /
Applications/FileBot.app/Contents/MacOS/filebot.sh -script fn:amc "/Volumes/Data HD/Downloads/Movies to Move" --output "/Volumes/Media 2/Movies" --conflict override -non-strict --def artwork=n forceMovie=y "movieFormat={n} ({y})"

and it didn't work.

Any help would be much appreciated.
trendykendy
 
Posts: 2
Joined: Fri Apr 20, 2012 10:17 am

Re: Shell script problem Thu Jun 05, 2014 1:59 pm • by trendykendy
Ok so I'm an idiot, the script runs fine in terminal if i start it with /, as in "/Applications/".

Still doesn't work in Hazel though :cry:
trendykendy
 
Posts: 2
Joined: Fri Apr 20, 2012 10:17 am

Re: Shell script problem Fri Jun 06, 2014 3:04 pm • by Mr_Noodle
You'll have to check with Filebot and see what environment it is assuming. Remember that Hazel does not run in the same environment as the commandline so you'll likely have to set certain environment variables yourself. Also, search the forums as there might have been others that have figured this out with Filebot.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support