Added macOS to the docker sudo exception

This commit is contained in:
Thomas Büttner 2019-01-24 16:24:00 +01:00
parent f2d0d1f646
commit 6a3ed5d519
2 changed files with 4 additions and 2 deletions

View File

@ -8,7 +8,8 @@ package_temporary_dir="`pwd`/pkg-dist-tmp"
pkg_src_dir="`pwd`/pkg-src"
image_name="jellyfin-rpmbuild"
docker_sudo=""
if ! $(id -Gn | grep -q 'docker') && [ ! ${EUID:-1000} -eq 0 ] && [ ! $USER == "root" ]; then
if ! $(id -Gn | grep -q 'docker') && [ ! ${EUID:-1000} -eq 0 ] && \
[ ! $USER == "root" ] && ! $(echo "$OSTYPE" | grep -q "darwin"); then
docker_sudo=sudo
fi

View File

@ -19,7 +19,8 @@ pkg_src_dir="`pwd`/pkg-src"
current_user="`whoami`"
image_name="jellyfin-rpmbuild"
docker_sudo=""
if ! $(id -Gn | grep -q 'docker') && [ ! ${EUID:-1000} -eq 0 ] && [ ! $USER == "root" ]; then
if ! $(id -Gn | grep -q 'docker') && [ ! ${EUID:-1000} -eq 0 ] && \
[ ! $USER == "root" ] && ! $(echo "$OSTYPE" | grep -q "darwin"); then
docker_sudo=sudo
fi