Skip to content

Commit ac2bfd2

Browse files
authored
Merge pull request #387 from smuppand/infra
chore(utils): make platform.sh POSIX-safe and fix ShellCheck warnings
2 parents 528cc75 + a0f779c commit ac2bfd2

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

Runner/utils/platform.sh

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,14 @@
66
# Detect Android userland
77
ANDROID_PATH=/system/build.prop
88
if [ -f $ANDROID_PATH ]; then
9-
ANDROID=1
109
# shellcheck disable=SC2209,SC2034
1110
SHELL_CMD=sh
1211
else
13-
ANDROID=0
1412
# shellcheck disable=SC2209,SC2034
1513
SHELL_CMD=bash
1614
fi
1715

18-
function pidkiller()
16+
pidkiller()
1917
{
20-
if [ $ANDROID -eq 0 ]; then
21-
disown $1
22-
fi
23-
kill -9 $1 >/dev/null 2>&1
18+
kill -9 "$1" >/dev/null 2>&1
2419
}

0 commit comments

Comments
 (0)