diff --git a/setup.sh b/setup.sh index 60af5bb95..1596d4534 100755 --- a/setup.sh +++ b/setup.sh @@ -4,7 +4,7 @@ set -ex # If we are a root in a Docker container and `sudo` doesn't exist # lets overwrite it with a function that just executes things passed to sudo # (yeah it won't work for sudo executed with flags) -if [ -f /.dockerenv ] && ! hash sudo 2>/dev/null && whoami | grep root; then +if [ -f /.dockerenv ] && ! hash sudo 2>/dev/null && whoami | grep root; then sudo() { $* } @@ -48,7 +48,7 @@ else fi if linux; then - distro=$(cat /etc/os-release | grep "^ID=" | cut -d\= -f2 | sed -e 's/"//g') + distro=$(grep "^ID=" /etc/os-release | cut -d'=' -f2 | sed -e 's/"//g') case $distro in "ubuntu")