-
Notifications
You must be signed in to change notification settings - Fork 7
/
rpmpkg-setup.sh
executable file
·52 lines (40 loc) · 1.33 KB
/
rpmpkg-setup.sh
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/bash
set -x -e -o pipefail
DISTRO=fedora
if [ "$1" = "centos:8" ]; then
DISTRO=centos
fi
if [ "$1" = "centos:7" ]; then
DISTRO=centos
fi
mkdir -p /run/user/${UID}
chmod 0700 /run/user/${UID}
yum install -y wget make gcc
curl -1sLf \
'https://dl.cloudsmith.io/public/wand/libwandio/cfg/setup/bash.rpm.sh' \
| bash
curl -1sLf \
'https://dl.cloudsmith.io/public/wand/libwandder/cfg/setup/bash.rpm.sh' \
| bash
curl -1sLf \
'https://dl.cloudsmith.io/public/wand/libtrace/cfg/setup/bash.rpm.sh' \
| bash
yum update -y
if [ "$1" = "centos:8" ]; then
yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm || true
dnf install -y 'dnf-command(config-manager)' || true
yum config-manager --set-enabled PowerTools || true
fi
if [ "$1" = "centos:7" ]; then
yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm || true
fi
if [[ "$1" =~ fedora* ]]; then
dnf install -y rpm-build rpmdevtools 'dnf-command(builddep)' which
dnf group install -y "C Development Tools and Libraries"
dnf builddep -y rpm/libflowmanager.spec
else
yum install -y rpm-build yum-utils rpmdevtools which
yum groupinstall -y 'Development Tools'
yum-builddep -y rpm/libflowmanager.spec
fi
rpmdev-setuptree