From 0aae325d8c676bfed61dc9d215e0724d77bcf7af Mon Sep 17 00:00:00 2001 From: Ethan Lee Date: Sun, 17 Jun 2012 05:57:57 -0300 Subject: [PATCH] Update master --- executables/LWJake2.sh | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/executables/LWJake2.sh b/executables/LWJake2.sh index 758ec4b..ee57e8d 100755 --- a/executables/LWJake2.sh +++ b/executables/LWJake2.sh @@ -1,4 +1,17 @@ #!/bin/bash + +# Move to script's directory cd `dirname $0` -export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./ -java -jar lwjake2.jar $@ + +# Get the kernel information +UNAME=`uname` + +# Set the proper libpath +if [ "$UNAME" == "Darwin" ]; then + export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:./ +elif [ "$UNAME" == "Linux" ]; then + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./ +fi + +# Run it! +java -jar lwjake2.jar $@ \ No newline at end of file