From 5f2387e52baa1693004913afc5edd80e0438e91b Mon Sep 17 00:00:00 2001 From: Owen Walpole Date: Sat, 29 Jul 2017 23:21:01 -0500 Subject: [PATCH 1/3] silence which output --- build.sh | 2 ++ writeimage.sh | 2 ++ 2 files changed, 4 insertions(+) diff --git a/build.sh b/build.sh index dac91efc6d..68a516cb06 100755 --- a/build.sh +++ b/build.sh @@ -13,7 +13,9 @@ 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) +exec &> /dev/null gzip=$(which pigz || which gzip) +exec 1>&1 2>&2 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..8abbd8b5b5 100755 --- a/writeimage.sh +++ b/writeimage.sh @@ -76,7 +76,9 @@ if ! [ -f $DISK_IMG ]; then exit 1 fi +exec &> /dev/null gunzip=$(which unpigz || which gunzip) +exec 1>&1 2>&2 if [[ $DISK_IMG == *.gz ]]; then msg "decompressing the gzipped image" From b4c343f1b592c177dfeaa00d8456b0becd140898 Mon Sep 17 00:00:00 2001 From: Owen Walpole Date: Sun, 30 Jul 2017 12:05:53 -0500 Subject: [PATCH 2/3] make redirection more readable --- build.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/build.sh b/build.sh index 68a516cb06..039a06f983 100755 --- a/build.sh +++ b/build.sh @@ -13,9 +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) -exec &> /dev/null -gzip=$(which pigz || which gzip) -exec 1>&1 2>&2 +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) From 2ec01b758940f0fdee3a7cfc435e7cf5ffe35d12 Mon Sep 17 00:00:00 2001 From: Owen Walpole Date: Sun, 30 Jul 2017 12:06:57 -0500 Subject: [PATCH 3/3] make redirection more readable --- writeimage.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/writeimage.sh b/writeimage.sh index 8abbd8b5b5..2bc1793ca8 100755 --- a/writeimage.sh +++ b/writeimage.sh @@ -76,9 +76,7 @@ if ! [ -f $DISK_IMG ]; then exit 1 fi -exec &> /dev/null -gunzip=$(which unpigz || which gunzip) -exec 1>&1 2>&2 +gunzip=$(which unpigz 2> /dev/null || which gunzip 2> /dev/null) if [[ $DISK_IMG == *.gz ]]; then msg "decompressing the gzipped image"