Skip to content

Commit

Permalink
minor updates
Browse files Browse the repository at this point in the history
  • Loading branch information
morrownr committed Dec 26, 2020
1 parent af79bf7 commit 52341d2
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 22 deletions.
3 changes: 1 addition & 2 deletions edit-options.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ SCRIPT_NAME="edit-options.sh"
#
# $ sudo ./edit-options.sh
#
if [ $EUID -ne 0 ]
then
if [[ $EUID -ne 0 ]]; then
echo "You must run this script with superuser (root) privileges."
echo "Try: \"sudo ./${SCRIPT_NAME}\""
exit 1
Expand Down
9 changes: 3 additions & 6 deletions raspi32.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
sed -i 's/CONFIG_PLATFORM_I386_PC = y/CONFIG_PLATFORM_I386_PC = n/g' Makefile
RESULT=$?

if [ "$RESULT" != "0" ]
then
if [[ "$RESULT" != "0" ]]; then
echo "An error occurred and I386 support was not turned off in Makefile."
exit 1
else
Expand All @@ -24,12 +23,10 @@ fi
sed -i 's/CONFIG_PLATFORM_ARM_RPI = n/CONFIG_PLATFORM_ARM_RPI = y/g' Makefile
RESULT=$?

if [ "$RESULT" != "0" ]
then
if [[ "$RESULT" != "0" ]]; then
echo "An error occurred and Raspberry Pi OS (32 bit) support was not turned on in Makefile."
exit 1
else
echo "Raspberry Pi OS (32 bit) support was turned on in Makefile as planned."
exit 0
fi

exit 0
9 changes: 3 additions & 6 deletions raspi64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
sed -i 's/CONFIG_PLATFORM_I386_PC = y/CONFIG_PLATFORM_I386_PC = n/g' Makefile
RESULT=$?

if [ "$RESULT" != "0" ]
then
if [[ "$RESULT" != "0" ]]; then
echo "An error occurred and I386 support was not turned off in Makefile."
exit 1
else
Expand All @@ -24,12 +23,10 @@ fi
sed -i 's/CONFIG_PLATFORM_ARM64_RPI = n/CONFIG_PLATFORM_ARM64_RPI = y/g' Makefile
RESULT=$?

if [ "$RESULT" != "0" ]
then
if [[ "$RESULT" != "0" ]]; then
echo "An error occurred and Raspberry Pi OS (64 bit) support was not turned on in Makefile."
exit 1
else
echo "Raspberry Pi OS (64 bit) support was turned on in Makefile as planned."
exit 0
fi

exit 0
2 changes: 1 addition & 1 deletion remove-driver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ DRV_NAME="rtl8814au"
DRV_VERSION="5.8.5.1"
OPTIONS_FILE="8814au.conf"

KRNL_VERSION=$(uname -r)
KRNL_VERSION="$(uname -r)"
SCRIPT_NAME="remove-driver.sh"

if [[ $EUID -ne 0 ]]; then
Expand Down
11 changes: 4 additions & 7 deletions save-log.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ SCRIPT_NAME="save-log.sh"
#
# $ sudo ./edit-options.sh
#
if [ $EUID -ne 0 ]
then
echo "You must run ${SCRIPT_NAME} with superuser priviliges."
if [[ $EUID -ne 0 ]]; then
echo "You must run this script with superuser (root) privileges."
echo "Try: \"sudo ./${SCRIPT_NAME}\""
exit 1
fi
Expand All @@ -25,13 +24,11 @@ rm -f -- rtw.log
dmesg | cut -d"]" -f2- | grep "RTW" >> rtw.log
RESULT=$?

if [ "$RESULT" != "0" ]
then
if [[ "$RESULT" != "0" ]]; then
echo "An error occurred while running: ${SCRIPT_NAME}"
echo "Did you set a log level > 0 ?"
exit 1
else
echo "rtw.log saved successfully."
exit 0
fi

exit 0

0 comments on commit 52341d2

Please sign in to comment.