summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMihai Moldovan <ionic@ionic.de>2015-04-01 10:32:48 +0200
committerMihai Moldovan <ionic@ionic.de>2015-04-01 10:32:48 +0200
commit60c5f4b41441ebcfe69bfb4b4864f46011eec5a7 (patch)
tree159bd8815ad08d8456ff2c4003c0d4b74fa6473e
parentdf34303d5d997384a9f6c467052dfee417866c9a (diff)
downloadbuildscripts-60c5f4b41441ebcfe69bfb4b4864f46011eec5a7.tar.gz
buildscripts-60c5f4b41441ebcfe69bfb4b4864f46011eec5a7.tar.bz2
buildscripts-60c5f4b41441ebcfe69bfb4b4864f46011eec5a7.zip
bin/build-rpm-package: disallow hyphens again. Bad idea for greedy regexes, especially when hyphens are used as field separators.
-rwxr-xr-xbin/build-rpm-package2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/build-rpm-package b/bin/build-rpm-package
index cc7d304..7c886d0 100755
--- a/bin/build-rpm-package
+++ b/bin/build-rpm-package
@@ -258,7 +258,7 @@ create_mock_config () { # MOCK_BASE CUSTOM_REPO COMPONENT TARGET
# Check argument sanity.
typeset DISTRO=""
# distribution - version - arch
- typeset TMP_REGEX='^([[:alpha:]]+)-[[:alnum:]_-]+-[[:alnum]_-]+\.cfg$'
+ typeset 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