51 lines · 1.0 KB · Text
RawDownload
#!/usr/bin/bash -e # if sudo is not installed, define an empty aliasmaysudo=$(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  )  $maysudo "$apt" install -y "${deps[@]}"  exit 0fi # 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  )  $maysudo "$dnf" install -y "${deps[@]}"  exit 0fi # Arch, Manjaro, etc.# https://archlinux.org/packagespacman=$(command -v pacman || true)if [[ -n $pacman ]]; then  deps=(    alsa-lib    fontconfig    vulkan-validation-layers    wayland    libxkbcommon-x11  )  $maysudo "$pacman" -S --needed --noconfirm "${deps[@]}"  exit 0fi echo "Unsupported Linux distribution in script/linux"