NOT using the package manager.
- https://theswiftdev.com/how-to-build-better-command-line-apps-and-tools-using-swift/
- https://rderik.com/blog/using-swift-for-scripting/
- Making A Real Tool: https://rayfix.org/2021/04/21/argument_parsing.html
- list of articles https://github.com/artemnovichkov/Swift-For-Scripting
- Note to self: explore differences between
ConsoleKit
(vapor) andArgumentParser
(Apple) - Using shell From within https://stackoverflow.com/questions/26971240/how-do-i-run-a-terminal-command-in-a-swift-script-e-g-xcodebuild
Environment Variables
- https://developer.apple.com/documentation/xcode/environment-variable-reference
- https://developer.apple.com/documentation/foundation/processinfo/1417911-environment
- https://blog.eidinger.info/use-environment-variables-from-env-file-in-a-swift-package
- https://github.com/vapor/vapor/blob/main/Sources/Vapor/Utilities/DotEnv.swift
chmod +x swift_hello
./swift_hello.swift apple banana kumquat