Skip to content

Instantly share code, notes, and snippets.

@codehz
Created October 1, 2020 09:30
Show Gist options
  • Save codehz/a5f66d21dbee360bde2aa4a129aa23a0 to your computer and use it in GitHub Desktop.
Save codehz/a5f66d21dbee360bde2aa4a129aa23a0 to your computer and use it in GitHub Desktop.
update zig (x86_64-linux)
#!/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