Last active
July 25, 2023 16:15
-
-
Save 0xNineteen/adc3a5d4253446678ec8c485d0178f38 to your computer and use it in GitHub Desktop.
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
URL=$(curl https://ziglang.org/download/index.json | jq '.master."aarch64-macos".tarball') | |
URL=${URL//\"/} | |
curl $URL -O | |
# unwrap .tar to directory | |
FN=$(basename "$URL") | |
tar xf $FN | |
rm $FN | |
# required: ~/.profile PATH already points to this 'zig' path | |
# same with VSCode settings | |
rm -rf ./zig/ | |
DIR=${FN%.tar.xz} | |
mv $DIR zig | |
source ~/.profile | |
# required: have this cloned in zls/ folder: https://github.com/zigtools/zls | |
# required: "zig.zls.path" is set in VSCode to this path (zls/zig-out/bin/zls) | |
cd zls/ | |
git pull origin master | |
zig build -Doptimize=ReleaseSafe | |
echo --- | |
echo zig version :: $(zig version) | |
echo zls version :: $(zig-out/bin/zls --version) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment