summaryrefslogtreecommitdiffstats
path: root/redhat/build/configure_repository.sh
blob: 2456b1a6a3d9e3336f1f1508576fa52c62413165 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash

TDE_VERSION=${1:-14.0.0}
ARCH=$(uname -i)
RPMDIR=$(rpm -E %{_rpmdir}.tde-${TDE_VERSION})

if [ -x /usr/bin/yum ]; then
  cat <<EOF >/tmp/rpmbuild-tde.repo
[rpmbuild.${ARCH}]
name=rpmbuild.${ARCH}
baseurl=file://${RPMDIR}/${ARCH}
enabled=1
gpgcheck=0

[rpmbuild.noarch]
name=rpmbuild.noarch
baseurl=file://${RPMDIR}/noarch
enabled=1
gpgcheck=0
EOF
  sudo mv -f /tmp/rpmbuild-tde.repo /etc/yum.repos.d/
fi