Run FileBot headless without Dock icon on OSX

Standard

FileBot is a great utility for finding the names and subtitles of downloaded TV shows and movies. I use it as part of a shell script to organise downloaded media files.

Unfortunately, the suggested way to invoke it from the command line is simply to call filebot, e.g. /Applications/FileBot.app/Contents/MacOS/filebot ....

This was causing FileBot to pop up a Java icon in the dock and steal focus, whenever it was invoked which was driving me crazy. Fortunately the solution is simple: Run the FileBot jar directly with the awt.headless set to true. As follows:

java -jar -Djava.awt.headless=true /Applications/FileBot.app/Contents/Resources/java/FileBot.jar ...

No more annoying icon.