Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions docs/static/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -877,6 +877,16 @@ if [ "$OS" = "Darwin" ]; then
exit 0
fi

SUDO=
if [ "$(id -u)" -ne 0 ]; then
# Running as root, no need for sudo
if ! available sudo; then
fatal "This script requires superuser permissions. Please re-run as root."
fi

SUDO="sudo"
fi

if check_gpu lspci amdgpu || check_gpu lshw amdgpu; then
HAS_AMD=true
fi
Expand All @@ -889,16 +899,6 @@ if check_gpu lspci intel || check_gpu lshw intel; then
HAS_INTEL=true
fi

SUDO=
if [ "$(id -u)" -ne 0 ]; then
# Running as root, no need for sudo
if ! available sudo; then
fatal "This script requires superuser permissions. Please re-run as root."
fi

SUDO="sudo"
fi

PACKAGE_MANAGER=
for PACKAGE_MANAGER in dnf yum apt-get; do
if available $PACKAGE_MANAGER; then
Expand Down
Loading