kuryr-kubernetes/contrib/devstack-heat/hot/distro_deps.sh
Michał Dulko afbc4d7bdc Update devstack-heat
This useful tool was outdated and written really clumsily. This commit
rewrites bash code to Python, adds options like peeking stack.sh logs,
deploying from a commit or branch and fixes deploying from a gerrit
change.

Change-Id: Icaa01d660b2cdf376d6f000230114986a454c4fb
2022-05-12 17:50:53 +02:00

20 lines
621 B
Bash

distro=$(awk -F'=' '/^ID=/ {print $2}' /etc/os-release)
distro="${distro%\"}"
distro="${distro#\"}"
if [[ "$distro" =~ centos|fedora ]]; then
yum install -y git python-devel
yum group install -y Development Tools
if [[ "$distro" == "centos" ]]; then
yum install -y epel-release
sed -i -e '/Defaults requiretty/{ s/.*/# Defaults requiretty/ }' /etc/sudoers
fi
yum install -y jq
yum install -y python-pip
pip install -U setuptools
elif [[ "$distro" =~ ubuntu|debian ]]; then
apt update -y
apt upgrade -y
apt-get install -y build-essential git python-dev jq
fi