From e26ae9f4e7b7e545d07550b3670c9606227fab9f Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Sun, 20 Nov 2011 18:04:50 +0000 Subject: [PATCH] * added OSX cmdline support (thanks to Christopher!) --- build.xml | 3 +++ installer/appbundle/filebot | 8 +++++--- installer/appbundle/install.sh | 4 ++++ 3 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 installer/appbundle/install.sh diff --git a/build.xml b/build.xml index 4cbe3ada..01e689b6 100644 --- a/build.xml +++ b/build.xml @@ -149,7 +149,10 @@ + + + diff --git a/installer/appbundle/filebot b/installer/appbundle/filebot index d8ac8f9d..3297e8ed 100644 --- a/installer/appbundle/filebot +++ b/installer/appbundle/filebot @@ -1,5 +1,7 @@ #!/bin/bash +SOURCE="${BASH_SOURCE[0]}" +while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done +dir_bin="$( cd -P "$( dirname "$SOURCE" )" && pwd )" -# UNTESTED ON OSX, PROBABLY DOESN'T WORK!! -# Help me fix this startup script! Contact me at rednoah@users.sourceforge.net -java -Dapplication.deployment=app "-Djna.library.path=../Resources/Java" -Xmx256m -jar "../Resources/Java/FileBot.jar" "$@" +dir_app=$dir_bin/../Resources/Java +java -Dapplication.deployment=app "-Djna.library.path=$dir_app" -Xmx256m -jar "$dir_app/FileBot.jar" "$@" diff --git a/installer/appbundle/install.sh b/installer/appbundle/install.sh new file mode 100644 index 00000000..695d5705 --- /dev/null +++ b/installer/appbundle/install.sh @@ -0,0 +1,4 @@ +#!/bin/bash +dir_bin=`dirname $0` +path_cmd=$dir_bin/filebot +sudo ln -s "$path_cmd" /usr/bin/filebot