Files
Kare Morstol 4da7c5b668 Use $SWIFTSHELL_FRAMEWORK_PATH instead of $DYLD_FRAMEWORK_PATH in the swiftshell launcher script.
Because of this change in El Capitan:

	"Spawning children processes of processes restricted by System Integrity Protection, such as by launching a helper process in a bundle with NSTask or calling the exec(2) command, resets the Mach special ports of that child process. Any dynamic linker (dyld) environment variables, such as DYLD_LIBRARY_PATH, are purged when launching protected processes."

https://developer.apple.com/library/prerelease/mac/documentation/Security/Conceptual/System_Integrity_Protection_Guide/RuntimeProtections/RuntimeProtections.html
2015-11-09 21:45:54 +01:00

22 lines
613 B
Bash
Executable File

#!/bin/bash
#
# SwiftShell run script
#
# The folders where Swift can find the frameworks it imports as modules.
# SwiftShell.framework must be in one of these.
FRAMEWORKS_PATH=$SWIFTSHELL_FRAMEWORK_PATH:~/Library/Frameworks:/Library/Frameworks
# Add a : to the beginning if not already there
if [[ $FRAMEWORKS_PATH != :* ]]
then
FRAMEWORKS_PATH=:$FRAMEWORKS_PATH
fi
# Swift needs folders one at a time, so we replace : with " -F "
SWIFT_FRAMEWORK_ARGUMENTS=${FRAMEWORKS_PATH//:/ -F }
# Pass Swift all the arguments, the first of which is the Swift file to run.
xcrun swift $SWIFT_FRAMEWORK_ARGUMENTS "$@"