From 28ab6aa2bfe5311f979ee377d7ae2d489b25fd55 Mon Sep 17 00:00:00 2001
From: Jonas Toth <development@jonas-toth.eu>
Date: Wed, 31 Jul 2019 18:00:16 +0200
Subject: [PATCH] build: adjust Makefile and test/run_examples.sh slightly to
 work with gentoo-like build environemnt

---
 Makefile              | 2 +-
 tests/run_examples.sh | 6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 284f218d..63bfc0ef 100644
--- a/Makefile
+++ b/Makefile
@@ -79,7 +79,7 @@ vendor: $(VENDOR)
 version: $(GIT_REVISION)
 
 $(GIT_REVISION):
-	git rev-parse master > git_revision.txt
+	git rev-parse HEAD > git_revision.txt
 
 $(VENDOR):
 	rm -rf .cargo vendor vendor.tar.xz
diff --git a/tests/run_examples.sh b/tests/run_examples.sh
index b4bbf93a..d488b622 100755
--- a/tests/run_examples.sh
+++ b/tests/run_examples.sh
@@ -55,7 +55,11 @@ export EXAMPLES_DIR
 CPU_CORES=$(nproc --all)
 
 # Build debug binary
-cargo +$TOOLCHAIN build
+if [ $RUSTUP -eq 1 ]; then
+	cargo +$TOOLCHAIN build
+else
+	cargo build
+fi
 test_generic
 test_params
 
-- 
GitLab