Skip to content

Instantly share code, notes, and snippets.

@matklad
Created June 2, 2023 21:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matklad/10f7fd27c932e3b08af34f9561d84443 to your computer and use it in GitHub Desktop.
Save matklad/10f7fd27c932e3b08af34f9561d84443 to your computer and use it in GitHub Desktop.
#!/bin/sh
echo `# <#`
mkdir -p ./zig
wget https://ziglang.org/download/0.10.1/zig-linux-x86_64-0.10.1.tar.xz -O ./zig/zig-linux-x86_64-0.10.1.tar.xz
tar -xf ./zig/zig-linux-x86_64-0.10.1.tar.xz -C ./zig --strip-components=1
rm ./zig/zig-linux-x86_64-0.10.1.tar.xz
echo "Zig installed."
./zig/zig version
exit
#> > $null
New-Item -ItemType Directory -Force -Path ".\zig"
Invoke-WebRequest -Uri "https://ziglang.org/download/0.10.1/zig-windows-x86_64-0.10.1.zip" -OutFile ".\zig\zig-windows-x86_64-0.10.1.zip"
Expand-Archive -Path ".\zig\zig-windows-x86_64-0.10.1.zip" -DestinationPath ".\zig" -Force
Remove-Item -Path ".\zig\zig-windows-x86_64-0.10.1.zip"
Write-Host "Zig installed."
./zig/zig.exe version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment