3 ms·
The tricky part is that it is impossible to import any libraries in a script except: - The official libraries that ship with Swift - If you create a full-blow
by terhechte 8y ago
The tricky part is that it is impossible to import any libraries in a script except:
- The official libraries that ship with Swift
- If you create a full-blown Swift package manager project and compile an executable. But this doesn't sound like a script anymore
- If you use John Sundell's Marathon [https://github.com/JohnSundell/Marathon https://github.com/JohnSundell/Marathon] however it adds additional complexity around the writing of scripts
I.e. none of the solutions are as simple as writing a bash script
Edit:
Just saw that Max Howell (creator of Homebrew) released this today https://github.com/mxcl/swift-sh https://github.com/mxcl/swift-sh
This absolutely solves the issues. Fantastic.
- wool_gather 8y agoswift-sh definitely bears looking into, thanks for that!