Use non-greedy modifier for SUBRELEASE grep

Some fedora mirrors are serving image icon html, and this grep is
over-matching on those mirrors.

Change-Id: Ibd737f44a8d2eee1902b6c5363c61d591feb75c9
This commit is contained in:
Steve Baker 2021-08-23 14:09:08 +12:00
parent a6ee4d0c21
commit 59420be677
1 changed files with 1 additions and 1 deletions

View File

@ -44,7 +44,7 @@ else
exit 1
;;
esac
SUBRELEASE=$(curl -Ls $DIB_CLOUD_IMAGES/ | grep -o -P '(?<=Fedora-Cloud-Base-'${DIB_RELEASE}'-).*(?=.'${ARCH}'.qcow2")' | sort -r | head -1)
SUBRELEASE=$(curl -Ls $DIB_CLOUD_IMAGES/ | grep -o -P '(?<=Fedora-Cloud-Base-'${DIB_RELEASE}'-).*?(?=.'${ARCH}'.qcow2")' | sort -r | head -1)
BASE_IMAGE_FILE=${BASE_IMAGE_FILE:-Fedora-Cloud-Base-$DIB_RELEASE-$SUBRELEASE.$ARCH.qcow2}
BASE_IMAGE_TAR=Fedora-Cloud-Base-$DIB_RELEASE-$SUBRELEASE.$ARCH.tgz
IMAGE_LOCATION=$DIB_CLOUD_IMAGES/$BASE_IMAGE_FILE