From e6d3c8db51752179e630ab271eba4eea53dd2ac2 Mon Sep 17 00:00:00 2001 From: jahway603 Date: Thu, 8 Jul 2021 12:14:09 -0400 Subject: [PATCH] added rustc and cargo checks to build.sh --- build.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/build.sh b/build.sh index 9a8211c..a7ecdca 100755 --- a/build.sh +++ b/build.sh @@ -13,6 +13,18 @@ else JOBS=1 fi +# check if rustc and cargo are installed, otherwise exit with error +if ! command -v rustc &> /dev/null +then + echo "rustc could not be found. Please install it and try again." + exit +fi +if ! command -v cargo &> /dev/null +then + echo "cargo could not be found. Please install it and try again." + exit +fi + VERSION=$(cat src/version.h |cut -d\" -f2) echo "Compiling SilentDragonLite $VERSION with $JOBS threads..." CONF=silentdragon-lite.pro