From e20808b6f6b4bc4bd2f6e80e2a84dc2039961643 Mon Sep 17 00:00:00 2001 From: Lethosor Date: Sun, 11 Jan 2015 13:53:51 -0500 Subject: [PATCH] Allow `dfhack` script to be run from other directories on OS X --- package/darwin/dfhack | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/darwin/dfhack b/package/darwin/dfhack index 55aa81a98..8040a837a 100755 --- a/package/darwin/dfhack +++ b/package/darwin/dfhack @@ -1,5 +1,6 @@ #!/bin/sh PWD=`dirname "${0}"` +cd "${PWD}" #thanks to Iriel for figuring this out OSREV=`uname -r | cut -d. -f1` if [ "$OSREV" -ge 11 ] ; then @@ -11,7 +12,6 @@ else fi old_tty_settings=$(stty -g) -cd "${PWD}" DYLD_INSERT_LIBRARIES=./hack/libdfhack.dylib ./dwarfort.exe "$@" stty "$old_tty_settings" echo ""