From cf07ee94b35e54c86feb610a02725bc64e4432e1 Mon Sep 17 00:00:00 2001 From: Peter Feerick Date: Tue, 10 Aug 2021 19:42:18 +1000 Subject: [PATCH] Fix grep terminating script to if i386 not found --- tools/setup_buildenv_ubuntu20.04.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/setup_buildenv_ubuntu20.04.sh b/tools/setup_buildenv_ubuntu20.04.sh index 3c9ddf7cd..e9d2820c2 100644 --- a/tools/setup_buildenv_ubuntu20.04.sh +++ b/tools/setup_buildenv_ubuntu20.04.sh @@ -16,16 +16,15 @@ do fi done -if - [[ `lsb_release -rs` != "20.04" ]]; then +if [[ `lsb_release -rs` != "20.04" ]]; then echo "ERROR: Not running on Ubuntu 20.04!" echo "Terminating the script now." exit 1 fi echo "=== Step 1: Checking if i386 requirement is satisfied ===" -OUTPUT=$(dpkg --print-foreign-architectures 2> /dev/null | grep i386) -if [ $? -eq 1 ]; then +OUTPUT=x$(dpkg --print-foreign-architectures 2> /dev/null | grep i386) || : +if [ $OUTPUT != "xi386" ]; then echo "Need to install i386 architecture first." I386ARCH="no" sudo dpkg --add-architecture i386