goldilocks.js/installer/sudo-cmd.sh

6 lines
164 B
Bash
Raw Normal View History

2017-11-07 00:00:25 +00:00
# Not every platform has or needs sudo, gotta save them O(1)s...
sudo_cmd=""
2017-11-07 00:30:14 +00:00
if [ type -p sudo ]; then
2017-11-07 00:00:25 +00:00
((EUID)) && [[ -z "$ANDROID_ROOT" ]] && sudo_cmd="sudo"
fi