diff --git a/setup.bash b/setup.bash index d86f9fb..b6ce0d6 100644 --- a/setup.bash +++ b/setup.bash @@ -12,6 +12,10 @@ # curl -fsSL https://example.com/setup-min.bash | bash # wget -nv https://example.com/setup-min.bash -O - | bash +# Not every platform has or needs sudo, gotta save them O(1)s... +sudo_cmd="" +((EUID)) && [[ -z "$ANDROID_ROOT" ]] && sudo_cmd="sudo" + dont_install_deps="$1" set -e set -u @@ -287,7 +291,7 @@ if [ -n "${NODEJS_VER}" ]; then bash "/tmp/${INSTALL_FILE}" "${NODEJS_VER}" fi -sudo chown -R $(whoami) $node_install_path/lib/node_modules +$sudo_cmd chown -R $(whoami) $node_install_path/lib/node_modules echo ""