Skip to contentSkip to conversation

toolchain-shar-extract.sh: don't print useless info

PATCH New Changqing Li 1 participant 1 message Oct 16, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 toolchain-shar-extract.sh: don't print useless info

useless info "gcc: command not found" is printed when run buildtools-extended on system without gcc.

---
 meta/files/toolchain-shar-extract.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/files/toolchain-shar-extract.sh +1 -1
index 04527f891f..bea6d4189a 100644
@@ -26,7 +26,7 @@ tweakpath /sbin
 INST_ARCH=$(uname -m | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/")
 SDK_ARCH=$(echo @SDK_ARCH@ | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/")
 
-INST_GCC_VER=$(gcc --version | sed -ne 's/.* \([0-9]\+\.[0-9]\+\)\.[0-9]\+.*/\1/p')
+INST_GCC_VER=$(gcc --version 2>/dev/null | sed -ne 's/.* \([0-9]\+\.[0-9]\+\)\.[0-9]\+.*/\1/p')
 SDK_GCC_VER='@SDK_GCC_VER@'
 
 verlte () {
Signature · 1 line
2.17.1