Prevent the error messages produced by which(1), such as the one quoted
below, from being visible in the build outputs.
which: no dtc in (./scripts/dtc)
This makes the build outputs look a tiny bit cleaner.
Signed-off-by: Dragan Simic <[email protected]>
Reviewed-by: Quentin Schulz <[email protected]>
---
Notes:
Version 2 incorporates the suggestion from Quentin to use a more compact
version of the redirection, which is already used in multiple places.
The original motivation to use the more verbose version was to prevent
possible issues with some shells, or with some older shell versions, which
may not recognize the compact version.
scripts/dtc-version.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/dtc-version.sh b/scripts/dtc-version.sh
index 53ff868bcdce..18c59ac1e255 100755
--- a/scripts/dtc-version.sh
+++ b/scripts/dtc-version.sh
@@ -15,7 +15,7 @@ if [ ${#dtc} -eq 0 ]; then
exit 1
fi
-if ! which $dtc >/dev/null ; then
+if ! which $dtc > /dev/null 2>&1 ; then
echo "Error: Cannot find dtc: $dtc"
exit 1
fi