This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository buildscripts. from 60c5f4b bin/build-rpm-package: disallow hyphens again. Bad idea for greedy regexes, especially when hyphens are used as field separators. new fc13f5f bin/build-rpm-package: append .cfg extension to MOCK_BASE if necessary. The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: bin/build-rpm-package | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) -- Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository buildscripts. commit fc13f5f4362b523102df6ebd2f24786b56a09bee Author: Mihai Moldovan <ionic@ionic.de> Date: Wed Apr 1 10:37:37 2015 +0200 bin/build-rpm-package: append .cfg extension to MOCK_BASE if necessary. Remove it inline and non-destructively when building temporary mock config file name. --- bin/build-rpm-package | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/bin/build-rpm-package b/bin/build-rpm-package index 7c886d0..fd3b401 100755 --- a/bin/build-rpm-package +++ b/bin/build-rpm-package @@ -257,8 +257,15 @@ create_mock_config () { # MOCK_BASE CUSTOM_REPO COMPONENT TARGET # Check argument sanity. typeset DISTRO="" + + # Append .cfg is not already specified. + typeset TMP_REGEX='^.*\.cfg$' + if [[ ! "${MOCK_BASE}" =~ ${TMP_REGEX} ]]; then + MOCK_BASE="${MOCK_BASE}.cfg" + fi + # distribution - version - arch - typeset TMP_REGEX='^([[:alpha:]]+)-[[:alnum:]_]+-[[:alnum]_]+\.cfg$' + TMP_REGEX='^([[:alpha:]]+)-[[:alnum:]_]+-[[:alnum]_]+\.cfg$' if [[ ! "${MOCK_BASE}" =~ ${TMP_REGEX} ]]; then echo "Error: MOCK_BASE parameter not well formed. Must be: 'distro-version-arch.cfg'." >&2 exit -1 @@ -306,7 +313,7 @@ create_mock_config () { # MOCK_BASE CUSTOM_REPO COMPONENT TARGET exit -1 fi - TMP_MOCK_CFG_FILE="$(mktemp --tmpdir="${TEMP_BASE}" "$(basename "${TMP_MOCK_CFG_DIR}")/${MOCK_BASE}-${RPM_EXTRA_REPO_MOCK_CONFIG_BASE}-${COMPONENT}-${TARGET}.$(repeat_str "X" "24").cfg")" + 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")" if [ "$?" -ne "0" ]; then echo "Error: creating mock temporary config file failed. Aborting." >&2 exit -1 -- Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git