goldilocks.js/installer/sudo-cmd.sh

6 lines
186 B
Bash

# Not every platform has or needs sudo, gotta save them O(1)s...
sudo_cmd=""
if type -p sudo >/dev/null 2>/dev/null; then
((EUID)) && [[ -z "${ANDROID_ROOT-}" ]] && sudo_cmd="sudo"
fi