[X2Go-Commits] [buildscripts] 01/01: bin/build-rpm-package: only create a new temporary mock config directory if not already existing. Fix replacement of releasever.
git-admin at x2go.org
git-admin at x2go.org
Wed Apr 1 12:22:02 CEST 2015
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository buildscripts.
commit 5700080edcaba0cc3b4e1e3876a05fb3ff3311b8
Author: Mihai Moldovan <ionic at ionic.de>
Date: Wed Apr 1 12:21:52 2015 +0200
bin/build-rpm-package: only create a new temporary mock config directory if not already existing. Fix replacement of releasever.
---
bin/build-rpm-package | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/bin/build-rpm-package b/bin/build-rpm-package
index 1e77075..c344dc9 100755
--- a/bin/build-rpm-package
+++ b/bin/build-rpm-package
@@ -313,11 +313,14 @@ create_mock_config () { # MOCK_BASE CUSTOM_REPO COMPONENT TARGET
exit -1
fi
- # Create temporary directory for our soon-to-be temporary mock config file.
- TMP_MOCK_CFG_DIR="$(mktemp -d --tmpdir="${TEMP_BASE}" "${RPM_EXTRA_REPO_MOCK_CONFIG_BASE}-mock-$(repeat_str "X" "24")")"
- if [ "$?" -ne "0" ]; then
- echo "Error: creating mock temporary config directory failed. Aborting." >&2
- exit -1
+ # Create temporary directory for our soon-to-be temporary mock config file,
+ # if it does not already exist.
+ if [ -z "${TMP_MOCK_CFG_DIR}" ]; then
+ TMP_MOCK_CFG_DIR="$(mktemp -d --tmpdir="${TEMP_BASE}" "${RPM_EXTRA_REPO_MOCK_CONFIG_BASE}-mock-$(repeat_str "X" "24")")"
+ if [ "$?" -ne "0" ]; then
+ echo "Error: creating mock temporary config directory failed. Aborting." >&2
+ exit -1
+ fi
fi
TMP_MOCK_CFG_FILE="$(mktemp --tmpdir="${TEMP_BASE}" "$(basename "${TMP_MOCK_CFG_DIR}")/${MOCK_BASE%.cfg}-${RPM_EXTRA_REPO_MOCK_CONFIG_BASE}-${COMPONENT}-${TARGET}.$(repeat_str "X" "24").cfg")"
@@ -360,7 +363,7 @@ create_mock_config () { # MOCK_BASE CUSTOM_REPO COMPONENT TARGET
fi
case "${line}" in
- (*'$releasever'*) line="${line/'$releasever'/"${VERSION}"}"
+ (*'$releasever'*) line="${line/'$releasever'/${VERSION}}"
;;
(*) ;;
esac
--
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