diff options
author | François Andriot <albator78@libertysurf.fr> | 2018-11-27 21:34:48 +0100 |
---|---|---|
committer | François Andriot <albator78@libertysurf.fr> | 2018-11-27 21:34:48 +0100 |
commit | a615d19df88eb2e989316b480519161945dbc7dc (patch) | |
tree | 369970b98042998b86c11024598155e037b76fec /redhat/docker/run.sh | |
parent | 76a93e0011ade1583a1ec672f33411dfd35454f3 (diff) | |
download | tde-packaging-a615d19df88eb2e989316b480519161945dbc7dc.tar.gz tde-packaging-a615d19df88eb2e989316b480519161945dbc7dc.zip |
RPM: merge redhat directory with master branch
Diffstat (limited to 'redhat/docker/run.sh')
-rwxr-xr-x | redhat/docker/run.sh | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/redhat/docker/run.sh b/redhat/docker/run.sh new file mode 100755 index 000000000..30faba056 --- /dev/null +++ b/redhat/docker/run.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +DISTRIB="$1" +TDE_VERSION="$2" +ARCH="$3" + +[ -z "${TDE_VERSION}" ] && TDE_VERSION="14.0.5" +[ -z "${ARCH}" ] && ARCH="x86_64" + +IMAGE="trinity.${DISTRIB}.${ARCH}:${TDE_VERSION}" +DIST="$(sed -n ${DISTRIB}/rpmmacros -e "/%dist/ s|.* ||p")" + +mkdir -p "${HOME}/rpmbuild/RPMS/RPMS${DIST}.tde-${TDE_VERSION}" +mkdir -p "${HOME}/rpmbuild/SRPMS/SRPMS${DIST}.tde-${TDE_VERSION}" +mkdir -p "/dev/shm/docker" + +docker run -t -i --rm --privileged \ + -h "${IMAGE}" \ + --name "${IMAGE//:/-}" \ + -v /dev/shm/docker:/tmp:z \ + -u trinity \ + -e TMPPATH=/tmp \ + -e TDE_VERSION=${TDE_VERSION} \ + -w /home/trinity/tde/tde-packaging/redhat \ + -v ${HOME}/.gnupg:/home/trinity/.gnupg \ + -v ${HOME}/tde/tde-packaging:/home/trinity/tde/tde-packaging \ + -v ${HOME}/tde/tde-tarballs:/home/trinity/tde/tde-tarballs \ + -v ${HOME}/rpmbuild/RPMS/RPMS${DIST}.tde-${TDE_VERSION}:/home/trinity/rpmbuild/RPMS.tde-${TDE_VERSION} \ + -v ${HOME}/rpmbuild/SRPMS/SRPMS${DIST}.tde-${TDE_VERSION}:/home/trinity/rpmbuild/SRPMS.tde-${TDE_VERSION} \ + "${IMAGE}" setarch ${ARCH} bash |