Regex match fixes in the character class match for $FPM_RESULTS:
authorWard Vandewege <ward@curoverse.com>
Fri, 26 Jun 2015 18:55:22 +0000 (14:55 -0400)
committerWard Vandewege <ward@curoverse.com>
Fri, 26 Jun 2015 18:55:22 +0000 (14:55 -0400)
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

index b2c7ce39b4f4596206a3158d9c161736a43f7bb8..37dc5a40142ba63f5f45ae473613c9c8b338089a 100755 (executable)
@@ -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