Created
October 1, 2020 09:30
-
-
Save codehz/a5f66d21dbee360bde2aa4a129aa23a0 to your computer and use it in GitHub Desktop.
update zig (x86_64-linux)
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
#!/bin/bash | |
set -euxo pipefail | |
url=$(curl -s https://ziglang.org/download/index.json | jq -r '.master."x86_64-linux".tarball') | |
tmpf=$(mktemp /tmp/zig.XXXXXX) | |
exec 3>"$tmpf" 4<"$tmpf" | |
rm "$tmpf" | |
curl "$url" >&3 | |
tar Jxv -C /root/soft/zig --strip-components 1 <&4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment