forked from TrueCloudLab/s3-tests
Fix package detection on centos in bootstrap
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
This commit is contained in:
parent
bb3dfd200a
commit
7b3ea2051f
1 changed files with 23 additions and 9 deletions
32
bootstrap
32
bootstrap
|
@ -1,16 +1,30 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
for package in python-pip python-virtualenv python-dev libevent-dev; do
|
if [ -f /etc/debian_version ]; then
|
||||||
if [ "$(dpkg --status -- $package|sed -n 's/^Status: //p')" != "install ok installed" ]; then
|
for package in python-pip python-virtualenv python-dev libevent-dev; do
|
||||||
# add a space after old values
|
if [ "$(dpkg --status -- $package 2>/dev/null|sed -n 's/^Status: //p')" != "install ok installed" ]; then
|
||||||
missing="${missing:+$missing }$package"
|
# add a space after old values
|
||||||
|
missing="${missing:+$missing }$package"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if [ -n "$missing" ]; then
|
||||||
|
echo "$0: missing required packages, please install them:" 1>&2
|
||||||
|
echo " sudo apt-get install $missing"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [ -f /etc/redhat-release ]; then
|
||||||
|
for package in python-pip python-virtualenv python-devel libevent-devel; do
|
||||||
|
if [ "$(rpm -qa $package 2>/dev/null)" == "" ]; then
|
||||||
|
missing="${missing:+$missing }$package"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if [ -n "$missing" ]; then
|
||||||
|
echo "$0: missing required packages, please install them:" 1>&2
|
||||||
|
echo " sudo yum install $missing"
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
done
|
|
||||||
if [ -n "$missing" ]; then
|
|
||||||
echo "$0: missing required packages, please install them:" 1>&2
|
|
||||||
echo "sudo apt-get install $missing"
|
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
virtualenv --no-site-packages --distribute virtualenv
|
virtualenv --no-site-packages --distribute virtualenv
|
||||||
|
|
Loading…
Reference in a new issue