mirror of
https://github.com/PixelGuys/Cubyz.git
synced 2025-08-03 11:17:05 -04:00
21 lines
617 B
Bash
Executable File
21 lines
617 B
Bash
Executable File
#!/bin/bash
|
|
|
|
version=zig-linux-x86_64-0.12.0-dev.706+62a0fbdae
|
|
|
|
mkdir -p compiler/zig
|
|
touch compiler/version.txt
|
|
if [[ $(< compiler/version.txt) != "$version" ]]; then
|
|
echo "Deleting old zig installation..."
|
|
rm -r compiler/zig
|
|
mkdir compiler/zig
|
|
echo "Downloading $version..."
|
|
wget -O compiler/archive.tar.xz https://ziglang.org/builds/$version.tar.xz
|
|
echo "Extracting tar file..."
|
|
tar --xz -xf compiler/archive.tar.xz --directory compiler/zig --strip-components 1
|
|
echo "Done."
|
|
rm compiler/archive.tar.xz
|
|
rm compiler/version.txt
|
|
printf "$version" >> compiler/version.txt
|
|
fi
|
|
|
|
./compiler/zig/zig build run $@ |