aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/functions.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/functions.sh b/include/functions.sh
index bb71302..ab73e4a 100644
--- a/include/functions.sh
+++ b/include/functions.sh
@@ -408,7 +408,7 @@ is_root() {
ret=$(id -u)
else
# for android
- ret=$(id | sed -n 's/uid=//p' | sed -n 's/(root) [a-z]*=[0-9]*(log)//p')
+ ret=$(id | awk '{if ($1) print $1}' | sed 's/[^0-9]*//g')
fi
return $ret
}