[X2Go-Commits] [buildscripts] 02/06: bin/build-rpm-package: finally create the temporary dir and file.
git-admin at x2go.org
git-admin at x2go.org
Wed Apr 1 07:34:40 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 a8fe13f19fd5631f7b9f8d7ffcf2fcfd85562464
Author: Mihai Moldovan <ionic at ionic.de>
Date: Wed Apr 1 06:44:56 2015 +0200
bin/build-rpm-package: finally create the temporary dir and file.
---
bin/build-rpm-package | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/bin/build-rpm-package b/bin/build-rpm-package
index 7be653e..de2e02d 100755
--- a/bin/build-rpm-package
+++ b/bin/build-rpm-package
@@ -271,6 +271,19 @@ create_mock_config () { # MOCK_BASE CUSTOM_REPO COMPONENT TARGET
echo "Error: TARGET parameter must be either full or base." >&2
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_NAME}-mock-$(repeat_str "X" "24")")"
+ if [ "$?" -ne "0" ]; then
+ echo "Error: creating mock temporary config directory failed. Aborting." >&2
+ exit -1
+ fi
+
+ TMP_MOCK_CFG_FILE="$(mktemp --tmpdir="${TEMP_BASE}" "$(basename "${TMP_MOCK_CFG_DIR}")/${MOCK_BASE}-${RPM_EXTRA_REPO_MOCK_CONFIG_BASE_NAME}-${COMPONENT}-${TARGET}.$(repeat_str "X" "24").cfg")"
+ if [ "$?" -ne "0" ]; then
+ echo "Error: creating mock temporary config file failed. Aborting." >&2
+ exit -1
+ fi
}
get_extra_repository () {
--
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