mirror of
https://github.com/morrownr/8821cu-20210916.git
synced 2024-12-22 06:15:50 +00:00
Addressed whines from "shellcheck -s sh"
This commit is contained in:
parent
b4a7f21fdd
commit
5fd204f3df
@ -1,4 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/usr/bin/dash
|
||||||
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
SCRIPT_NAME="save-log.sh"
|
SCRIPT_NAME="save-log.sh"
|
||||||
#
|
#
|
||||||
@ -12,7 +13,7 @@ SCRIPT_NAME="save-log.sh"
|
|||||||
#
|
#
|
||||||
# $ sudo ./edit-options.sh
|
# $ sudo ./edit-options.sh
|
||||||
#
|
#
|
||||||
if [[ $EUID -ne 0 ]]; then
|
if [ "$(id -u)" -ne 0 ]; then
|
||||||
echo "You must run this script with superuser (root) privileges."
|
echo "You must run this script with superuser (root) privileges."
|
||||||
echo "Try: \"sudo ./${SCRIPT_NAME}\""
|
echo "Try: \"sudo ./${SCRIPT_NAME}\""
|
||||||
exit 1
|
exit 1
|
||||||
@ -24,7 +25,7 @@ rm -f -- rtw.log
|
|||||||
dmesg | cut -d"]" -f2- | grep "RTW" >> rtw.log
|
dmesg | cut -d"]" -f2- | grep "RTW" >> rtw.log
|
||||||
RESULT=$?
|
RESULT=$?
|
||||||
|
|
||||||
if [[ "$RESULT" != "0" ]]; then
|
if [ "$RESULT" != "0" ]; then
|
||||||
echo "An error occurred while running: ${SCRIPT_NAME}"
|
echo "An error occurred while running: ${SCRIPT_NAME}"
|
||||||
echo "Did you set a log level > 0 ?"
|
echo "Did you set a log level > 0 ?"
|
||||||
exit 1
|
exit 1
|
||||||
|
Loading…
Reference in New Issue
Block a user