From 0ae6deca87d2fd647cc6bbc3ff8d160c7e884bdb Mon Sep 17 00:00:00 2001 From: morrownr Date: Mon, 30 Jan 2023 12:09:56 -0600 Subject: [PATCH] pre-release cleanup --- README.md | 11 ++++++++++- install-driver.sh | 10 +++++++++- remove-driver.sh | 6 +++--- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 145d492..ab0e5cb 100644 --- a/README.md +++ b/README.md @@ -745,8 +745,17 @@ Contributors: @tamojitray @amisix @henkv1 +@SubZero5 ----- +----- + +To-Do: + +- Test for installation in VM's. +- Optimize scripts. +- Installation script needs to check country code setup. + +----- #### [Go to Main Menu](https://github.com/morrownr/USB-WiFi) diff --git a/install-driver.sh b/install-driver.sh index 4f99915..2de7888 100755 --- a/install-driver.sh +++ b/install-driver.sh @@ -28,8 +28,8 @@ SCRIPT_VERSION="20230126" MODULE_NAME="8821cu" DRV_VERSION="5.12.0.4" -KVER="$(uname -r)" KARCH="$(uname -m)" +KVER="$(uname -r)" MODDESTDIR="/lib/modules/${KVER}/kernel/drivers/net/wireless/" DRV_NAME="rtl${MODULE_NAME}" @@ -74,6 +74,14 @@ if ! command -v gcc >/dev/null 2>&1; then exit 1 fi +# check to ensure bc is installed +if ! command -v bc >/dev/null 2>&1; then + echo "A required package is not installed." + echo "Please install the following package: bc" + echo "Once the package is installed, please run \"sudo ./${SCRIPT_NAME}\"" + exit 1 +fi + # check to ensure make is installed if ! command -v make >/dev/null 2>&1; then echo "A required package is not installed." diff --git a/remove-driver.sh b/remove-driver.sh index e8c5cca..b932e29 100755 --- a/remove-driver.sh +++ b/remove-driver.sh @@ -28,8 +28,8 @@ SCRIPT_VERSION="20230126" MODULE_NAME="8821cu" DRV_VERSION="5.12.0.4" -KVER="$(uname -r)" KARCH="$(uname -m)" +KVER="$(uname -r)" MODDESTDIR="/lib/modules/${KVER}/kernel/drivers/net/wireless/" DRV_NAME="rtl${MODULE_NAME}" @@ -67,7 +67,7 @@ echo ": ${SCRIPT_NAME} v${SCRIPT_VERSION}" # information that helps with bug reports # display architecture -echo ": ${KARCH} (architecture" +echo ": ${KARCH} (architecture)" # display kernel version echo ": ${KVER} (kernel version)" @@ -132,7 +132,7 @@ echo "You may now delete the driver directory if desired." # if NoPrompt is not used, ask user some questions if [ $NO_PROMPT -ne 1 ]; then - printf "Do you want to apply the new options by rebooting now? (recommended) [y/N] " + printf "Do you want to reboot now? (recommended) [y/N] " read -r REPLY case "$REPLY" in [yY]*) reboot ;;