Skip to content

Commit

Permalink
Restore old terminal settings on segfault on OS X
Browse files Browse the repository at this point in the history
  • Loading branch information
lethosor committed May 11, 2014
1 parent cca8014 commit bbc4172
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions package/darwin/dfhack
Expand Up @@ -3,12 +3,15 @@ PWD=`dirname "${0}"`
#thanks to Iriel for figuring this out
OSREV=`uname -r | cut -d. -f1`
if [ "$OSREV" -ge 11 ] ; then
export DYLD_INSERT_LIBRARIES=./hack/libdfhack.dylib
export DYLD_LIBRARY_PATH=${PWD}/hack:${PWD}/libs
export DYLD_FRAMEWORK_PATH=${PWD}/hack:${PWD}/libs
else
export DYLD_INSERT_LIBRARIES=./hack/libdfhack.dylib
export DYLD_FALLBACK_LIBRARY_PATH=${PWD}/hack:${PWD}/libs
export DYLD_FALLBACK_FRAMEWORK_PATH=${PWD}/hack:${PWD}/libs
fi
cd "${PWD}"; ./dwarfort.exe

old_tty_settings=$(stty -g)
cd "${PWD}"
DYLD_INSERT_LIBRARIES=./hack/libdfhack.dylib ./dwarfort.exe
stty "$old_tty_settings"
echo ""

0 comments on commit bbc4172

Please sign in to comment.