From b641def0e5d79f2a5407e0c7373f78b4a841e81a Mon Sep 17 00:00:00 2001
From: Jonas Toth <development@jonas-toth.eu>
Date: Wed, 31 Jul 2019 18:46:52 +0200
Subject: [PATCH] build: check for existence of 0 instead of string comparisons

---
 tests/run_examples.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/run_examples.sh b/tests/run_examples.sh
index 5c57df61..ff01644e 100755
--- a/tests/run_examples.sh
+++ b/tests/run_examples.sh
@@ -55,7 +55,9 @@ export EXAMPLES_DIR
 CPU_CORES=$(nproc --all)
 
 # Build debug binary
-if [ -n "$RUSTUP" ] && [ "$RUSTUP" -eq 1 ]; then
+# Check if the variabl $RUSTUP is set. If yes the $TOOLCHAIN can be choosen via cargo, otherwise cargo might not now
+# about that feature.
+if [ -v RUSTUP ]; then
 	cargo +$TOOLCHAIN build
 else
 	cargo build
-- 
GitLab