mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-07 20:39:04 +03:00
a3300aed31
Very minor quality of life update, passing the --needed flag to pacman to skip reinstalling up to date dependencies. Release Notes: - N/A
46 lines
924 B
Bash
Executable File
46 lines
924 B
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*
|
|
)
|
|
$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
|
|
)
|
|
$maysudo "$dnf" 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
|
|
)
|
|
$maysudo "$pacman" -S --needed --noconfirm "${deps[@]}"
|
|
exit 0
|
|
fi
|
|
|
|
echo "Unsupported Linux distribution in script/linux"
|