diff --git a/build.sh b/build.sh index dac91efc6d..039a06f983 100755 --- a/build.sh +++ b/build.sh @@ -13,7 +13,7 @@ cd $(dirname $0) basedir=$(pwd) osname=$(source $basedir/board/common/overlay/etc/version && echo $os_short_name) osversion=$(source $basedir/board/common/overlay/etc/version && echo $os_version) -gzip=$(which pigz || which gzip) +gzip=$(which pigz 2> /dev/null || which gzip 2> /dev/null) if [ "$board" == "all" ]; then boards=$(ls $basedir/configs/*_defconfig | grep -v initramfs | grep -oE '\w+_defconfig$' | cut -d '_' -f 1) diff --git a/writeimage.sh b/writeimage.sh index 99895df526..2bc1793ca8 100755 --- a/writeimage.sh +++ b/writeimage.sh @@ -76,7 +76,7 @@ if ! [ -f $DISK_IMG ]; then exit 1 fi -gunzip=$(which unpigz || which gunzip) +gunzip=$(which unpigz 2> /dev/null || which gunzip 2> /dev/null) if [[ $DISK_IMG == *.gz ]]; then msg "decompressing the gzipped image"