From 09610def7a3e7e17c1401d8200edafda440c15b2 Mon Sep 17 00:00:00 2001 From: dave caruso Date: Fri, 20 Sep 2024 01:02:01 -0700 Subject: [PATCH] chore: add xz as a dependency in build script --- build | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/build b/build index a474038245b6912825760ba31dfcc946b791a227..7df2dc10169b1ee7f2abd5bbf31fffda7e464835 100755 --- a/build +++ b/build @@ -3,9 +3,9 @@ # It automatically installs a Zig compiler to ./.zig-cache # if needed. The output will be in ./zig-out/bin. # -# `curl` and `tar` is required in order to download and -# extract Zig, respectively. The rest of the dependencies -# are downloaded compiled using the Zig build system. +# `curl`, `tar`, and `xz` are required in order to download +# and extract Zig. The rest of the dependencies are compiled +# from source using the Zig build system. cd -- "$(dirname -- "$0")" ZIG_VERSION=$(grep .minimum_zig_version build.zig.zon \ @@ -46,6 +46,7 @@ if [ ! -f "$ZIG" ]; then CURL=$(command -v curl 2>/dev/null) TAR=$(command -v tar 2>/dev/null) + XZ=$(command -v xz 2>/dev/null) if [ -z "$CURL" ]; then printf "This script requires 'curl' to be installed.\n" @@ -53,8 +54,10 @@ if [ ! -f "$ZIG" ]; then if [ -z "$TAR" ]; then printf "This script requires 'tar' to be installed.\n" fi - - if [ -z "$CURL" ] || [ -z "$TAR" ]; then + if [ -z "$XZ" ]; then + printf "This script requires 'xz' to be installed.\n" + fi + if [ -z "$CURL" ] || [ -z "$TAR" ] || [ -z "$XZ" ]; then exit 1 fi -- 2.54.0