authorgravatar for me@paperdave.netdave caruso <me@paperdave.net> 2024-09-20 01:02:01-07:00
committergravatar for me@paperdave.netdave caruso <me@paperdave.net> 2024-09-20 01:02:01-07:00
log09610def7a3e7e17c1401d8200edafda440c15b2
tree2e31faa0077ae956d7ac762bc417ec9ca83d316d
parentcf9ca2293af388f9a160e35b2159ea2b75a20245
signature Commit is signed but in an unrecognized format.

chore: add xz as a dependency in build script


1 files changed, 8 insertions(+), 5 deletions(-)

build+8-5
...@@ -3,9 +3,9 @@...@@ -3,9 +3,9 @@
3# It automatically installs a Zig compiler to ./.zig-cache3# It automatically installs a Zig compiler to ./.zig-cache
4# if needed. The output will be in ./zig-out/bin.4# if needed. The output will be in ./zig-out/bin.
5#5#
6# `curl` and `tar` is required in order to download and6# `curl`, `tar`, and `xz` are required in order to download
7# extract Zig, respectively. The rest of the dependencies7# and extract Zig. The rest of the dependencies are compiled
8# are downloaded compiled using the Zig build system.8# from source using the Zig build system.
9cd -- "$(dirname -- "$0")"9cd -- "$(dirname -- "$0")"
1010
11ZIG_VERSION=$(grep .minimum_zig_version build.zig.zon \11ZIG_VERSION=$(grep .minimum_zig_version build.zig.zon \
...@@ -46,6 +46,7 @@ if [ ! -f "$ZIG" ]; then...@@ -46,6 +46,7 @@ if [ ! -f "$ZIG" ]; then
4646
47 CURL=$(command -v curl 2>/dev/null)47 CURL=$(command -v curl 2>/dev/null)
48 TAR=$(command -v tar 2>/dev/null)48 TAR=$(command -v tar 2>/dev/null)
49 XZ=$(command -v xz 2>/dev/null)
4950
50 if [ -z "$CURL" ]; then51 if [ -z "$CURL" ]; then
51 printf "This script requires 'curl' to be installed.\n"52 printf "This script requires 'curl' to be installed.\n"
...@@ -53,8 +54,10 @@ if [ ! -f "$ZIG" ]; then...@@ -53,8 +54,10 @@ if [ ! -f "$ZIG" ]; then
53 if [ -z "$TAR" ]; then54 if [ -z "$TAR" ]; then
54 printf "This script requires 'tar' to be installed.\n"55 printf "This script requires 'tar' to be installed.\n"
55 fi56 fi
5657 if [ -z "$XZ" ]; then
57 if [ -z "$CURL" ] || [ -z "$TAR" ]; then58 printf "This script requires 'xz' to be installed.\n"
59 fi
60 if [ -z "$CURL" ] || [ -z "$TAR" ] || [ -z "$XZ" ]; then
58 exit 161 exit 1
59 fi62 fi
6063