From 53ff42836cfe0b4035dc71399f75f4176e0b7abd Mon Sep 17 00:00:00 2001 From: fgsfds Date: Wed, 20 Sep 2023 10:36:21 +0200 Subject: [PATCH] tools: rarezip: use system gzip on non-linux --- tools/rarezip | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tools/rarezip b/tools/rarezip index f53e5d2a6..0429c5cb7 100755 --- a/tools/rarezip +++ b/tools/rarezip @@ -6,4 +6,13 @@ test $size -gt 0 || exit 0 printf "0: 1173 %.6x" $size | xxd -r -g0 -tools/gzip -c --no-name --best $1 | head --bytes=-8 | tail --bytes=+11 +if [[ "$OSTYPE" == "linux-gnu"* ]]; then + # use supplied gzip 1.2.4 for Linux + gzipbin="tools/gzip" +else + # use system gzip on other systems + # NOTE: this might result in a non-matching file, but we don't really care + gzipbin="gzip -f" +fi + +$gzipbin -c --no-name --best $1 | head --bytes=-8 | tail --bytes=+11