zed/script/linux
eyecreate 266bb62813
Update linux deps to include opensuse (#8127)
Release Notes:

- Added support for openSuse to Linux dependency installer script.
2024-02-21 15:01:33 -08:00

71 lines
1.4 KiB
Bash
Executable File

#!/usr/bin/bash -e
# if sudo is not installed, define an empty alias
maysudo=$(command -v sudo || true)
# Ubuntu, Debian, etc.
# https://packages.ubuntu.com/
apt=$(command -v apt-get || true)
if [[ -n $apt ]]; then
deps=(
libasound2-dev
libfontconfig-dev
vulkan-validationlayers*
libwayland-dev
libxkbcommon-x11-dev
openssl
)
$maysudo "$apt" install -y "${deps[@]}"
exit 0
fi
# Fedora, CentOS, RHEL, etc.
# https://packages.fedoraproject.org/
dnf=$(command -v dnf || true)
if [[ -n $dnf ]]; then
deps=(
alsa-lib-devel
fontconfig-devel
vulkan-validation-layers
wayland-devel
libxkbcommon-x11-devel
openssl-devel
)
$maysudo "$dnf" install -y "${deps[@]}"
exit 0
fi
# openSuse
# https://software.opensuse.org/
zyp=$(command -v zypper || true)
if [[ -n $zyp ]]; then
deps=(
alsa-devel
fontconfig-devel
vulkan-validationlayers
wayland-devel
libxkbcommon-x11-devel
openssl-devel
)
$maysudo "$zyp" install -y "${deps[@]}"
exit 0
fi
# Arch, Manjaro, etc.
# https://archlinux.org/packages
pacman=$(command -v pacman || true)
if [[ -n $pacman ]]; then
deps=(
alsa-lib
fontconfig
vulkan-validation-layers
wayland
libxkbcommon-x11
openssl
)
$maysudo "$pacman" -S --needed --noconfirm "${deps[@]}"
exit 0
fi
echo "Unsupported Linux distribution in script/linux"