diff options
author | Patrick Darley <patrick.darley@codethink.co.uk> | 2015-09-21 18:13:48 +0100 |
---|---|---|
committer | Patrick Darley <patrick.darley@codethink.co.uk> | 2015-09-21 18:16:54 +0100 |
commit | 90dd4a5d1cb808fe837ecf529264bef2d147af2a (patch) | |
tree | b2d827884f81ea70cc7bcf161816c8d00583d0e9 /prep_for_ybd.sh | |
parent | 237b09ce57a3b19cdde8fe2ddeb60eac6eae397c (diff) | |
download | buildslave-scripts-90dd4a5d1cb808fe837ecf529264bef2d147af2a.tar.gz |
Support prep for apt things too
Diffstat (limited to 'prep_for_ybd.sh')
-rwxr-xr-x | prep_for_ybd.sh | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/prep_for_ybd.sh b/prep_for_ybd.sh index 96673ec..28e7ad8 100755 --- a/prep_for_ybd.sh +++ b/prep_for_ybd.sh @@ -1,9 +1,15 @@ #!/bin/sh -# Script to set up an aws or other yum-y machine +# Script to set up yum-y or apt-y machine for ybd use -package_manager=yum - -"$package_manager" install -y make automake gcc gcc-c++ kernel-devel git gawk python-pip +if [ -x /usr/bin/apt ]; then + apt-get install -y make automake gcc g++ linux-headers-$(uname -r) git gawk python-pip +elif [ -x /usr/bin/yum ]; then + yum install -y make automake gcc gcc-c++ kernel-devel git gawk python-pip +else + echo "Unsuported package manager, try apt or yum." + exit 1 +fi pip install pyyaml sandboxlib jsonschema requests + |