mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 03:18:16 +00:00
ci: make install_deps.sh more flexible
This will allow us to use it in containers as well as specify whether we want to install test dependencies.
This commit is contained in:
27
.github/scripts/install_deps.sh
vendored
27
.github/scripts/install_deps.sh
vendored
@@ -1,10 +1,31 @@
|
||||
#!/bin/bash
|
||||
|
||||
SUDO="sudo"
|
||||
|
||||
while (($# > 0)); do
|
||||
case $1 in
|
||||
--test) # install test dependencies
|
||||
TEST=1
|
||||
shift
|
||||
;;
|
||||
--container) # don't use sudo
|
||||
SUDO=""
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
os=$(uname -s)
|
||||
if [[ $os == Linux ]]; then
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y build-essential cmake curl gettext locales-all ninja-build pkg-config unzip "$@"
|
||||
$SUDO apt-get update
|
||||
$SUDO apt-get install -y build-essential cmake curl gettext ninja-build pkg-config unzip
|
||||
if [[ -n $TEST ]]; then
|
||||
$SUDO apt-get install -y locales-all cpanminus
|
||||
fi
|
||||
elif [[ $os == Darwin ]]; then
|
||||
brew update --quiet
|
||||
brew install ninja "$@"
|
||||
brew install ninja
|
||||
if [[ -n $TEST ]]; then
|
||||
brew install cpanminus
|
||||
fi
|
||||
fi
|
||||
|
Reference in New Issue
Block a user