summaryrefslogtreecommitdiff
path: root/bin/build-rpm-package
diff options
context:
space:
mode:
authorMihai Moldovan <ionic@ionic.de>2015-04-01 08:27:58 +0200
committerMihai Moldovan <ionic@ionic.de>2015-04-01 08:27:58 +0200
commitb00b97e3ea1d3279c772321a92fea3139ba76d47 (patch)
tree88ba0e55ca57eca2633986a4746c40fe1ea8ccf4 /bin/build-rpm-package
parentdec04afb6d38cf62c12fbfdd72b7fb8fc12d27bc (diff)
downloadbuildscripts-b00b97e3ea1d3279c772321a92fea3139ba76d47.tar.gz
buildscripts-b00b97e3ea1d3279c772321a92fea3139ba76d47.tar.bz2
buildscripts-b00b97e3ea1d3279c772321a92fea3139ba76d47.zip
bin/build-rpm-package: add the repos and do pass-through correctly.
Diffstat (limited to 'bin/build-rpm-package')
-rwxr-xr-xbin/build-rpm-package18
1 files changed, 17 insertions, 1 deletions
diff --git a/bin/build-rpm-package b/bin/build-rpm-package
index 1db9c77..8409321 100755
--- a/bin/build-rpm-package
+++ b/bin/build-rpm-package
@@ -343,11 +343,27 @@ create_mock_config () { # MOCK_BASE CUSTOM_REPO COMPONENT TARGET
REPO_START=1
elif [ "${REPO_START}" -eq "1" ] && [[ "${line}" =~ ${TMP_REGEX_END} ]]; then
# Time to insert whatever is required.
+ printf '\n' >> "${TMP_MOCK_CFG_FILE}"
+ # Extras repo.
+ typeset -i i=0
+ for ((i = 0; i < ${#extra_repo[@]}; ++i)); do
+ echo "${extra_repo[${i}]}" >> "${TMP_MOCK_CFG_FILE}"
+ done
+
+ # Full repo if required.
+ if [ "${TARGET}" = "full" ]; then
+ printf '\n' >> "${TMP_MOCK_CFG_FILE}"
+
+ typeset -i i=0
+ for ((i = 0; i < ${#full_repo[@]}; ++i)); do
+ echo "${full_repo[${i}]}" >> "${TMP_MOCK_CFG_FILE}"
+ done
+ fi
elif [ "${REPO_START}" -eq "0" ] && [[ "${line}" =~ ${TMP_REGEX_END} ]]; then
echo "Error: Parsing mock base config file failed: unexpected end of yum configuration, no start found." >&2
exit -1
- elif [ "${REPO_START}" -eq "0" ]; then
+ else
# Write-through.
echo "${line}" >> "${TMP_MOCK_CFG_FILE}"
fi