diff options
author | Paul Sherwood <paul.sherwood@codethink.co.uk> | 2016-05-12 10:01:10 +0100 |
---|---|---|
committer | Paul Sherwood <paul.sherwood@codethink.co.uk> | 2016-05-12 10:01:16 +0100 |
commit | 895962965842d25b145b646c10888bdce9ddacd6 (patch) | |
tree | 3eccccbeb2773f86221955194a236e8ccb73e65a /install_dependencies.sh | |
parent | dace4d18ad240719d3b80f1f8dd2e114da924756 (diff) | |
download | ybd-895962965842d25b145b646c10888bdce9ddacd6.tar.gz |
Check that apt|yum|dnf is found
Diffstat (limited to 'install_dependencies.sh')
-rwxr-xr-x | install_dependencies.sh | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/install_dependencies.sh b/install_dependencies.sh index 2286536..41f0126 100755 --- a/install_dependencies.sh +++ b/install_dependencies.sh @@ -22,20 +22,33 @@ # echo what we're doing set -x +installed=false # install dependencies for debian, ubuntu which apt-get 2>&1 > /dev/null if [ $? -eq 0 ]; then sudo apt-get -qq update sudo apt-get -qq install build-essential gawk git m4 wget + installed=true fi # install for fedora which dnf 2>&1 > /dev/null -if [ $? -eq 0 ]; then +if [ $? -eq 0 ] && [ $installed = false ]; then sudo dnf install -y which make automake gcc gcc-c++ gawk git m4 wget + installed=true +fi + +# install for aws +which yum 2>&1 > /dev/null +if [ $? -eq 0 ] && [ $installed = false ]; then + sudo yum install -y which make automake gcc gcc-c++ gawk git m4 wget + installed=true fi -# FIXME: check the above installs worked? +if [ $installed = false ]; then + echo "No way to install dependencies: [apt|dnf|yum] not found" + exit 1 +fi pip --version 2>&1 > /dev/null if [ $? -ne 0 ]; then |