From 598d191de7ae6033ababaefcfcfc973e13ccdcbe Mon Sep 17 00:00:00 2001 From: Ward Vandewege Date: Fri, 26 Jun 2015 14:55:22 -0400 Subject: [PATCH] Regex match fixes in the character class match for $FPM_RESULTS: a) we want to match a literal dot, not any character b) bash 4.2 does not support escaping a dash to include it in the character class, move the dash to the last character listed in the class refs #6389 --- jenkins/run-build-packages.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins/run-build-packages.sh b/jenkins/run-build-packages.sh index b2c7ce3..37dc5a4 100755 --- a/jenkins/run-build-packages.sh +++ b/jenkins/run-build-packages.sh @@ -307,7 +307,7 @@ fpm_verify_and_scp () { FPM_RESULTS=$@ FPM_PACKAGE_NAME='' - if [[ $FPM_RESULTS =~ ([A-Za-z0-9_\-.]*\.)(deb|rpm) ]]; then + if [[ $FPM_RESULTS =~ ([A-Za-z0-9_\.-]*\.)(deb|rpm) ]]; then FPM_PACKAGE_NAME=${BASH_REMATCH[1]}${BASH_REMATCH[2]} fi -- 2.30.2