From ed2af2e82dbcfccb7392e9fbc3f837de1594c103 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Tue, 4 Jan 2022 14:32:41 +0100 Subject: [PATCH] build system: detect if build host has no bzip2 Signed-off-by: Denys Vlasenko --- scripts/bb_release | 6 +++--- scripts/embedded_scripts | 6 ++++++ scripts/mkconfigs | 11 +++++++++++ 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/scripts/bb_release b/scripts/bb_release index 545440d3a..180ad8f2e 100755 --- a/scripts/bb_release +++ b/scripts/bb_release @@ -17,7 +17,7 @@ VERSION=`ls busybox-*.tar.gz | sed 's/busybox-\(.*\)\.tar\.gz/\1/'` zcat busybox-$VERSION.tar.gz | bzip2 > busybox-$VERSION.tar.bz2 for releasefile in busybox-$VERSION.tar.gz busybox-$VERSION.tar.bz2; do - test -f $releasefile || { echo "no $releasefile"; exit 1; } - gpg --detach-sign $releasefile - sha256sum $releasefile > $releasefile.sha256 + test -f $releasefile || { echo "no $releasefile"; exit 1; } + gpg --detach-sign $releasefile + sha256sum $releasefile > $releasefile.sha256 done diff --git a/scripts/embedded_scripts b/scripts/embedded_scripts index aa7bf3e8a..205ac591a 100755 --- a/scripts/embedded_scripts +++ b/scripts/embedded_scripts @@ -23,6 +23,12 @@ if test $? != 0; then exit 1 fi +bzip2 /dev/null +if test $? != 0; then + echo 'bzip2 is not installed' + exit 1 +fi + custom_scripts="" if [ -d "$custom_loc" ] then diff --git a/scripts/mkconfigs b/scripts/mkconfigs index 6a26fe1dd..1bbf10c3a 100755 --- a/scripts/mkconfigs +++ b/scripts/mkconfigs @@ -28,6 +28,17 @@ config=.config +od -v -b /dev/null +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 + echo 'bzip2 is not installed' + exit 1 +fi + { echo "\ #ifndef _BBCONFIGOPTS_H