-
-
Save ssbarnea/8324475f4599d36591bd149b44add716 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python_cmd() { | |
basename $(command -v python3 || command -v python2) | |
} | |
package_manager() { | |
pkg = $(command -v yum || command -v dnf) | |
if [ "$(python_cmd)" == "python3" ]; then | |
echo -n "$pkg -y --exclude=python2*" | |
else | |
echo -n "$pkg -y --exclude=python3*" | |
fi | |
} | |
install_deps () { | |
# If sudo isn't installed assume we already are a super user | |
# install it anyways so that the install of the other deps succeeds | |
sudo true || $(package_manager) install sudo | |
sudo $(package_manager) install \ | |
/usr/bin/git \ | |
gcc \ | |
iproute \ | |
libyaml \ | |
libselinux-python \ | |
libffi-devel \ | |
openssl-devel \ | |
python*-virtualenv \ | |
redhat-rpm-config | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment