File: test-setup.sh

package info (click to toggle)
python-pyeclib 1.6.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 7,648 kB
  • sloc: python: 2,365; ansic: 982; sh: 136; makefile: 30
file content (34 lines) | stat: -rwxr-xr-x 1,046 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash -xe

# This script is run by OpenStack CI jobs for tox based jobs during
# the pre-run phase.

# Install liberasurecode-devel for CentOS from RDO repository.

function is_rhel7 {
    [ -f /usr/bin/yum ] && \
        cat /etc/*release | grep -q -e "Red Hat" -e "CentOS" -e "CloudLinux" && \
        cat /etc/*release | grep -q 'release 7'
}
function is_rhel8 {
    [ -f /usr/bin/dnf ] && \
        cat /etc/*release | grep -q -e "Red Hat" -e "CentOS" -e "CloudLinux" && \
        cat /etc/*release | grep -q 'release 8'
}


if is_rhel7; then
    # Install CentOS OpenStack repos so that we have access to some extra
    # packages.
    sudo yum install -y centos-release-openstack-train
    # Now that RDO repositories are enabled, install missing
    # packages.
    sudo yum install -y liberasurecode-devel yasm
fi

if is_rhel8; then
    # Install CentOS OpenStack repos so that we have access to some extra
    # packages.
    sudo dnf install -y centos-release-openstack-ussuri
    sudo dnf install -y liberasurecode-devel yasm
fi