summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMihai Moldovan <ionic@ionic.de>2015-04-01 08:34:15 +0200
committerMihai Moldovan <ionic@ionic.de>2015-04-01 08:34:15 +0200
commit5a7b10e867542e5411d60a7a0e7440ced3c5f956 (patch)
tree28446a62defc86b3efbb7f514c9bc777301c51b1
parentb00b97e3ea1d3279c772321a92fea3139ba76d47 (diff)
downloadbuildscripts-5a7b10e867542e5411d60a7a0e7440ced3c5f956.tar.gz
buildscripts-5a7b10e867542e5411d60a7a0e7440ced3c5f956.tar.bz2
buildscripts-5a7b10e867542e5411d60a7a0e7440ced3c5f956.zip
bin/build-rpm-package: write out end of yum configuration marker, reset IFS to old value and return temporary file path as promised.
-rwxr-xr-xbin/build-rpm-package8
1 files changed, 8 insertions, 0 deletions
diff --git a/bin/build-rpm-package b/bin/build-rpm-package
index 8409321..20f3d7d 100755
--- a/bin/build-rpm-package
+++ b/bin/build-rpm-package
@@ -360,6 +360,8 @@ create_mock_config () { # MOCK_BASE CUSTOM_REPO COMPONENT TARGET
echo "${full_repo[${i}]}" >> "${TMP_MOCK_CFG_FILE}"
done
fi
+
+ echo "${line}" >> "${TMP_MOCK_CFG_FILE}"
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
@@ -368,6 +370,12 @@ create_mock_config () { # MOCK_BASE CUSTOM_REPO COMPONENT TARGET
echo "${line}" >> "${TMP_MOCK_CFG_FILE}"
fi
done < "/etc/mock/${MOCK_BASE}"
+
+ # Reset input field separator to original value.
+ IFS="${OLDIFS}"
+
+ # Strictly speaking not necessary, but do it anyway.
+ printf "${TMP_MOCK_CFG_FILE}"
}
get_extra_repository () {