summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMihai Moldovan <ionic@ionic.de>2015-04-01 06:44:56 +0200
committerMihai Moldovan <ionic@ionic.de>2015-04-01 06:44:56 +0200
commita8fe13f19fd5631f7b9f8d7ffcf2fcfd85562464 (patch)
tree6765915674371d1e1eab63f1658cf2894f0df18c
parent452048972380f27a28e47d44094140580895dd73 (diff)
downloadbuildscripts-a8fe13f19fd5631f7b9f8d7ffcf2fcfd85562464.tar.gz
buildscripts-a8fe13f19fd5631f7b9f8d7ffcf2fcfd85562464.tar.bz2
buildscripts-a8fe13f19fd5631f7b9f8d7ffcf2fcfd85562464.zip
bin/build-rpm-package: finally create the temporary dir and file.
-rwxr-xr-xbin/build-rpm-package13
1 files changed, 13 insertions, 0 deletions
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 () {