Created
February 13, 2024 18:40
-
-
Save moritztim/2ea5449cd5f7d140fe4e7e55fbbe3792 to your computer and use it in GitHub Desktop.
Macos PKL Install
This file contains 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
#!/bin/bash | |
tag="0.25.2" | |
# Identify CPU architecture | |
architecture="$(uname -m)" | |
if [ "$architecture" == "arm64" ] || [ "$architecture" == "aarch64" ]; then | |
build="aarch64" | |
elif [ "$architecture" == "x86_64" ]; then | |
if sysctl -n sysctl.proc_translated > /dev/null 2>&1; then | |
# This is an ARM CPU running in translation mode | |
build="aarch64" | |
else | |
build="amd64" | |
fi | |
else | |
echo "Couldn't identify CPU architecture." | |
exit 0 | |
fi | |
curl -L -o /usr/local/bin/pkl https://github.com/apple/pkl/releases/download/$tag/pkl-macos-$build | |
chmod +x /usr/local/bin/pkl | |
pkl --version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment