mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-08 10:02:56 +00:00
2c834c24a3
Build media and live-kit in test-mode on non-MacOS (Related to https://github.com/zed-industries/zed/issues/5391 https://github.com/zed-industries/zed/issues/5395 https://github.com/zed-industries/zed/issues/5394) This makes it possible to build the media and live-kit crates on non-MacOS Release Notes: - N/A
40 lines
733 B
Bash
Executable file
40 lines
733 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
# if not on Linux, do nothing
|
|
[[ $(uname) == "Linux" ]] || exit 0
|
|
|
|
# if sudo is not installed, define an empty alias
|
|
maysudo=$(command -v sudo || true)
|
|
export maysudo
|
|
|
|
# Ubuntu, Debian, etc.
|
|
apt=$(command -v apt-get || true)
|
|
deps=(
|
|
libasound2-dev
|
|
)
|
|
if [[ -n $apt ]]; then
|
|
$maysudo "$apt" install -y "${deps[@]}"
|
|
exit 0
|
|
fi
|
|
|
|
# Fedora, CentOS, RHEL, etc.
|
|
dnf=$(command -v dnf || true)
|
|
deps=(
|
|
alsa-lib-devel
|
|
)
|
|
if [[ -n $dnf ]]; then
|
|
$maysudo "$dnf" install -y "${deps[@]}"
|
|
exit 0
|
|
fi
|
|
|
|
# Arch, Manjaro, etc.
|
|
pacman=$(command -v pacman || true)
|
|
deps=(
|
|
alsa-lib
|
|
)
|
|
if [[ -n $pacman ]]; then
|
|
$maysudo "$pacman" -S --noconfirm "${deps[@]}"
|
|
exit 0
|
|
fi
|
|
|
|
echo "Unsupported Linux distribution in script/linux"
|