From 7bcf9b5821964a6c2a453c1d538f64d45c667deb Mon Sep 17 00:00:00 2001 From: morrownr Date: Tue, 29 Nov 2022 16:20:51 -0600 Subject: [PATCH] checks for needed support --- install-driver.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/install-driver.sh b/install-driver.sh index b692889..14de907 100755 --- a/install-driver.sh +++ b/install-driver.sh @@ -30,6 +30,33 @@ then exit 1 fi +# check to ensure nano is installed +if ! command -v nano >/dev/null 2>&1 +then + echo "A required package appears to not be installed." + echo "Please install the following package: nano" + echo "Once the package is installed, please run \"sudo ./${SCRIPT_NAME}\"" + exit 1 +fi + +# check to ensure rfkill is installed +if ! command -v rfkill >/dev/null 2>&1 +then + echo "A required package appears to not be installed." + echo "Please install the following package: rfkill" + echo "Once the package is installed, please run \"sudo ./${SCRIPT_NAME}\"" + exit 1 +fi + +# check to ensure iw is installed +if ! command -v iw >/dev/null 2>&1 +then + echo "A required package appears to not be installed." + echo "Please install the following package: iw" + echo "Once the package is installed, please run \"sudo ./${SCRIPT_NAME}\"" + exit 1 +fi + # support for the NoPrompt option allows non-interactive use of this script NO_PROMPT=0 @@ -65,6 +92,8 @@ fi echo "Linux Kernel=${KVER}" # architecture - for ARM: aarch64 = 64 bit, armv7l = 32 bit echo "CPU Architecture=${KARCH}" +# gcc version +echo "gcc --version | grep -i gcc" #getconf LONG_BIT (may be handy in the future) # blacklist the in-kernel module (driver) so that there is no conflict