Skip to content

Commit 33a28d3

Browse files
committed
benchmark: fix shell script lint errors
1 parent 1de914c commit 33a28d3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

benchmark/cpu.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ CPUPATH=/sys/devices/system/cpu
44

55
MAXID=$(cat $CPUPATH/present | awk -F- '{print $NF}')
66

7-
if [ "$(uname -s)" != "Linux" ]; then
7+
if [ "$(uname -s || true)" != "Linux" ]; then
88
echo "Error: This script runs on Linux only." >&2
99
exit 1
1010
fi
1111

12-
if [ "$(id -u)" -ne 0 ]; then
12+
if [ "$(id -u || true)" -ne 0 ]; then
1313
echo "Error: Run as root (sudo) to modify CPU governor." >&2
1414
exit 1
1515
fi

0 commit comments

Comments
 (0)