From fbe6880bf924f268c39b83838fcd76b873bb071c Mon Sep 17 00:00:00 2001 From: wattsy74 <49881777+wattsy74@users.noreply.github.com> Date: Thu, 2 Dec 2021 15:33:01 +0000 Subject: [PATCH] corrected version checking - incorrectly matching on fixed change text --- 1-password.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/1-password.sh b/1-password.sh index 4ad5844..9e58186 100644 --- a/1-password.sh +++ b/1-password.sh @@ -49,10 +49,10 @@ fi # To get just the latest version number from the 1Password 7 Release Notes URL /bin/echo "`date`: Getting latest version number" >> ${logfile} /bin/echo "Getting latest version number" -latestver=$(curl -s ${releaseNotesUrl} | grep 'download' | grep -vim 1 'beta' | cut -f2 -d'"' | cut -f2 -d"-" | sed -e 's/\.[^.]*$//') +latestver=$(curl -s ${releaseNotesUrl} | grep '>download<' | grep -vim 1 'beta' | cut -f2 -d'"' | cut -f2 -d"-" | sed -e 's/\.[^.]*$//') # To get the latest download link from the 1Password7 Release Notes URL -url=$(curl -s ${releaseNotesUrl} | grep 'download' | grep -vim 1 'beta' | cut -f2 -d'"') +url=$(curl -s ${releaseNotesUrl} | grep '>download<' | grep -vim 1 'beta' | cut -f2 -d'"') /bin/echo "`date`: Latest version number is: ${latestver}" >> ${logfile} /bin/echo "Latest version number is: ${latestver}"