This commit is contained in:
Takanori TANIGUCHI
2022-08-28 09:57:18 +09:00
parent 6876114fdf
commit 4a60dcb017

View File

@@ -472,7 +472,7 @@ downloadURLFromGit() { # $1 git user name, $2 git repo name
if [ -z "$downloadURL" ]; then if [ -z "$downloadURL" ]; then
cleanupAndExit 9 "could not retrieve download URL for $gitusername/$gitreponame" ERROR cleanupAndExit 9 "could not retrieve download URL for $gitusername/$gitreponame" ERROR
else else
echo "$downloadURL" | head -1 echo "$downloadURL"
return 0 return 0
fi fi
} }
@@ -3159,11 +3159,11 @@ libreoffice)
name="LibreOffice" name="LibreOffice"
type="dmg" type="dmg"
if [[ $(arch) == "arm64" ]]; then if [[ $(arch) == "arm64" ]]; then
arch_type="aarch64" downloadURL="https://download.documentfoundation.org/libreoffice/stable/$(curl -s https://www.libreoffice.org/download/download/ | grep dl_version_number | head -n 1 | cut -d'>' -f3 | cut -d'<' -f1)/mac/aarch64/LibreOffice_$(curl -s https://www.libreoffice.org/download/download/ | grep dl_version_number | head -n 1 | cut -d'>' -f3 | cut -d'<' -f1)_MacOS_aarch64.dmg"
elif [[ $(arch) == "i386" ]]; then
downloadURL="https://download.documentfoundation.org/libreoffice/stable/$(curl -s https://www.libreoffice.org/download/download/ | grep dl_version_number | head -n 1 | cut -d'>' -f3 | cut -d'<' -f1)/mac/x86_64/LibreOffice_$(curl -s https://www.libreoffice.org/download/download/ | grep dl_version_number | head -n 1 | cut -d'>' -f3 | cut -d'<' -f1)_MacOS_x86-64.dmg"
fi fi
libreoffice_latest_version="$(curl -Ls https://www.libreoffice.org/download/download-libreoffice/ | grep dl_version_number | head -n 1 | cut -d'>' -f3 | cut -d'<' -f1)" appNewVersion=$( echo "${downloadURL}" | sed -E 's/.*\/[a-zA-Z]*_([0-9.]*)_.*/\1/g' )
downloadURL="https://download.documentfoundation.org/libreoffice/stable/${libreoffice_latest_version}/mac/${arch_type:-x86_64}/LibreOffice_${libreoffice_latest_version}_MacOS_${arch_type:-x86-64}.dmg"
appNewVersion=$(echo "${downloadURL}" | sed -E 's/.*\/[a-zA-Z]*_([0-9.]*)_.*/\1/g')
expectedTeamID="7P5S3ZLCN7" expectedTeamID="7P5S3ZLCN7"
blockingProcesses=( soffice ) blockingProcesses=( soffice )
;; ;;