agent: Arch support
This commit is contained in:
@@ -11,15 +11,25 @@ if ! echo "$PATH" | grep -q "$PYENV_ROOT"; then
|
||||
fi
|
||||
if ! command -v pyenv &>/dev/null; then
|
||||
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
||||
# https://github.com/pyenv/pyenv/wiki#suggested-build-environment
|
||||
sudo apt-get install -qq build-essential libssl-dev zlib1g-dev \
|
||||
libbz2-dev libreadline-dev libsqlite3-dev curl \
|
||||
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
|
||||
if command -v apt-get >/dev/null 2>&1; then
|
||||
# https://github.com/pyenv/pyenv/wiki#suggested-build-environment
|
||||
sudo apt-get install -qq build-essential libssl-dev zlib1g-dev \
|
||||
libbz2-dev libreadline-dev libsqlite3-dev curl \
|
||||
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
|
||||
|
||||
# see https://github.com/pyenv/pyenv-installer
|
||||
bash -c "$(curl -fsSL https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer)"
|
||||
|
||||
unset pyenv_packages
|
||||
# see https://github.com/pyenv/pyenv-installer
|
||||
bash -c "$(curl -fsSL https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer)"
|
||||
elif command -v pacman >/dev/null 2>&1; then
|
||||
# Prefer native packages if available; otherwise install build deps then use installer
|
||||
if ! sudo pacman -Qi pyenv >/dev/null 2>&1; then
|
||||
sudo pacman -S --noconfirm --needed base-devel openssl zlib bzip2 readline sqlite xz tk libffi curl
|
||||
bash -c "$(curl -fsSL https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer)"
|
||||
else
|
||||
sudo pacman -S --noconfirm --needed pyenv pyenv-virtualenv
|
||||
fi
|
||||
else
|
||||
log_warn "Skipping pyenv install: no supported package manager found"
|
||||
fi
|
||||
elif [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
brew install pyenv
|
||||
brew install pyenv-virtualenv
|
||||
|
||||
Reference in New Issue
Block a user