Last active
November 22, 2024 05:55
-
-
Save kkebo/5471965f1ed4c63bb486f5ecdc6b3ee5 to your computer and use it in GitHub Desktop.
swiftly on macOS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"installedToolchains" : [], | |
"platform" : { | |
"namePretty" : "macOS", | |
"architecture" : null, | |
"name" : "xcode", | |
"nameFull" : "osx" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set -x SWIFTLY_HOME_DIR "$HOME/Library/Application Support/swiftly" | |
set -x SWIFTLY_BIN_DIR "$SWIFTLY_HOME_DIR/bin" | |
if not contains "$SWIFTLY_BIN_DIR" $PATH | |
set -x PATH "$SWIFTLY_BIN_DIR" $PATH | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export SWIFTLY_HOME_DIR="$HOME/Library/Application Support/swiftly" | |
export SWIFTLY_BIN_DIR="$SWIFTLY_HOME_DIR/bin" | |
if [[ ":$PATH:" != *":$SWIFTLY_BIN_DIR:"* ]]; then | |
export PATH="$SWIFTLY_BIN_DIR:$PATH" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How to install swiftly on macOS (until its macOS support is released)
Notice
When swiftly’s macOS support is officially released, please follow https://swiftlang.github.io/swiftly instead of this page.
Prerequisites
1. Build and install swiftly itself
2. Create config.json
Create
~/Library/Application Support/swiftly/config.json
. (See above for its content)3. Create env.fish
If you're using fish, create
~/Library/Application Support/swiftly/env.fish
. (See above for its content)If you're not using the other shells (e.g. ash, bash, zsh), create
~/Library/Application Support/swiftly/env.sh
. (See above for its content)4. Configure your shell
If you're using fish, create
~/.config/fish/conf.d/swiftly.fish
with the following content:source "$HOME/Library/Application Support/swiftly/env.fish"
If you're not using fish, add the following line to your
~/.profile
,~/.bash_profile
:source "$HOME/Library/Application Support/swiftly/env.fish"
5. Restart your shell
That's it!