[X2Go-Commits] [buildscripts] 01/02: bin/build-rpm-package: deduplicate some code segments.
git-admin at x2go.org
git-admin at x2go.org
Tue Mar 22 03:56:09 CET 2016
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository buildscripts.
commit 1bf3f83b63cda4690eb8c3dec8a907e67600c8d9
Author: Mihai Moldovan <ionic at ionic.de>
Date: Tue Mar 22 03:15:17 2016 +0100
bin/build-rpm-package: deduplicate some code segments.
---
bin/build-rpm-package | 30 ++++++++++++------------------
1 file changed, 12 insertions(+), 18 deletions(-)
diff --git a/bin/build-rpm-package b/bin/build-rpm-package
index 40e26d2..2f88a82 100755
--- a/bin/build-rpm-package
+++ b/bin/build-rpm-package
@@ -659,17 +659,20 @@ build_packages() {
mkdir -p -- "${PKGDIST}/${l_DIST}/${l_CODENAME}/"{x86_64,i386,SRPM}
+ if [ "x${l_DIST}" = "xopensuse" ] || [ "x${l_DIST}" = "xsle" ]; then
+ BUILD_RESULT="/home/abuild/rpmbuild/"
+ if [ "x${l_DIST}" = "xopensuse" ]; then
+ DOWNLOAD_URL="$(sed "s/#VERSION#/${l_CODENAME}/" <<< "${OPENSUSE_DOWNLOAD_URL}")"
+ elif [ "x${l_DIST}" = "xsle" ]; then
+ DOWNLOAD_URL="$(sed "s/#VERSION#/${l_CODENAME}/" <<< "${SLE_DOWNLOAD_URL}")"
+ if [ "${l_CODENAME}" = "11.2" ] || [ "${l_CODENAME}" = "11.3" ]; then
+ BUILD_RESULT="/usr/src/packages"
+ fi
+ fi
+ fi
+
if [ "x${SKIP_ARCH}" != "xx86_64" ] || [ "${IS_NOARCH}" = "yes" ]; then
if [ "x${l_DIST}" = "xopensuse" ] || [ "x${l_DIST}" = "xsle" ]; then
- BUILD_RESULT="/home/abuild/rpmbuild/"
- if [ "x${l_DIST}" = "xopensuse" ]; then
- DOWNLOAD_URL="$(sed "s/#VERSION#/${l_CODENAME}/" <<< "${OPENSUSE_DOWNLOAD_URL}")"
- elif [ "x${l_DIST}" = "xsle" ]; then
- DOWNLOAD_URL="$(sed "s/#VERSION#/${l_CODENAME}/" <<< "${SLE_DOWNLOAD_URL}")"
- if [ "${l_CODENAME}" = "11.2" ] || [ "${l_CODENAME}" = "11.3" ]; then
- BUILD_RESULT="/usr/src/packages"
- fi
- fi
while ps ax | grep -E "build.*/var/cache/obs-build/${l_DIST}/${l_CODENAME}/x86_64/" | grep "sudo obs"; do
echo "Waiting for some other build to finish..."
sleep 30
@@ -745,15 +748,6 @@ build_packages() {
fi
if [ "x${SKIP_ARCH}" != "xi386" ] && [ "${IS_NOARCH}" != "yes" ]; then
if [ "x${l_DIST}" = "xopensuse" ] || [ "x${l_DIST}" = "xsle" ]; then
- BUILD_RESULT="/home/abuild/rpmbuild/"
- if [ "x$l_DIST" = "xopensuse" ]; then
- DOWNLOAD_URL="$(sed "s/#VERSION#/${l_CODENAME}/" <<< "${OPENSUSE_DOWNLOAD_URL}")"
- elif [ "x$l_DIST" = "xsle" ]; then
- DOWNLOAD_URL="$(sed "s/#VERSION#/${l_CODENAME}/" <<< "${SLE_DOWNLOAD_URL}")"
- if [ "${l_CODENAME}" = "11.2" ] || [ "${l_CODENAME}" = "11.3" ]; then
- BUILD_RESULT="/usr/src/packages"
- fi
- fi
while ps ax | grep -E "build.*/var/cache/obs-build/${l_DIST}/${l_CODENAME}/i386/" | grep "sudo obs"; do
echo "Waiting for some other build to finish..."
sleep 30
--
Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git
More information about the x2go-commits
mailing list