macOS launcher: remove quarantine flags

Fixes #1465
develop
lethosor 2019-11-01 22:42:08 -04:00
parent 0292b32446
commit f3d5a185ba
1 changed files with 6 additions and 0 deletions

@ -11,6 +11,12 @@ else
export DYLD_FALLBACK_FRAMEWORK_PATH="./hack:./libs:./hack/libs"
fi
# attempt to remove quarantine flag: https://github.com/DFHack/dfhack/issues/1465
if ! test -f hack/quarantine-removed; then
find hack/ libs/ dwarfort.exe -name '*.dylib' -or -name '*.exe' -print0 | xargs -0 xattr -d com.apple.quarantine 2>&1 | grep -iv 'no such xattr'
echo "quarantine flag removed on $(date); remove this file to re-run" > hack/quarantine-removed
fi
old_tty_settings=$(stty -g)
DYLD_INSERT_LIBRARIES=./hack/libdfhack.dylib ./dwarfort.exe "$@"
stty "$old_tty_settings"