mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
Tools/setup/ubuntu.sh: fix GCC_VER_STR failure handling (#22007)
* Fixed an issue where if the GCC_VER_STR would not contain the right NUTTX_GCC_VERSION, the grep -c command would throw a failure, silently exiting the entire ubuntu.sh setup script
This commit is contained in:
parent
68bc90bab5
commit
e31e170438
@ -165,7 +165,7 @@ if [[ $INSTALL_NUTTX == "true" ]]; then
|
||||
source $HOME/.profile # load changed path for the case the script is reran before relogin
|
||||
if [ $(which arm-none-eabi-gcc) ]; then
|
||||
GCC_VER_STR=$(arm-none-eabi-gcc --version)
|
||||
GCC_FOUND_VER=$(echo $GCC_VER_STR | grep -c "${NUTTX_GCC_VERSION}")
|
||||
GCC_FOUND_VER=$(echo $GCC_VER_STR | grep -c "${NUTTX_GCC_VERSION}" || true)
|
||||
fi
|
||||
|
||||
if [[ "$GCC_FOUND_VER" == "1" ]]; then
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user