From 663319cec41bbff8b6e0e47fee7fedc84acfeafc Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Sun, 30 Oct 2022 08:35:01 +0000 Subject: build system: fix breakage affecting MSYS2 build Upstream changes to the embedded_scripts and mkconfigs scripts resulted in busybox-w32 failing to build with MSYS2. bzip2 in MSYS2 detects stdout redirected to /dev/null as a terminal and returns a non-zero exit status. Since the test is only for the existence of bzip2, not its functionality, even an exit status of 1 is OK. Only fail if the exit status is 127. --- scripts/embedded_scripts | 4 ++-- scripts/mkconfigs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/embedded_scripts b/scripts/embedded_scripts index 8407c1f78..88c3a13cb 100755 --- a/scripts/embedded_scripts +++ b/scripts/embedded_scripts @@ -23,8 +23,8 @@ if test $? != 0; then exit 1 fi -bzip2 /dev/null -if test $? != 0; then +bzip2 /dev/null 2>&1 +if test $? = 127; then echo 'bzip2 is not installed' exit 1 fi diff --git a/scripts/mkconfigs b/scripts/mkconfigs index 1bbf10c3a..9e4be6199 100755 --- a/scripts/mkconfigs +++ b/scripts/mkconfigs @@ -33,8 +33,8 @@ if test $? != 0; then echo 'od tool is not installed or cannot accept "-v -b" options' exit 1 fi -bzip2 /dev/null -if test $? != 0; then +bzip2 /dev/null 2>&1 +if test $? = 127; then echo 'bzip2 is not installed' exit 1 fi -- cgit v1.2.3-55-g6feb