From c5ad2291e046c6d4bc22990ea63dc8f4ff3e898c Mon Sep 17 00:00:00 2001 From: Theile Date: Wed, 28 Sep 2022 15:24:02 +0200 Subject: [PATCH] VLC version from file name ``` # utils/assemble.sh vlc DEBUG=0 2022-09-28 15:22:49 : INFO : vlc : setting variable from argument DEBUG=0 2022-09-28 15:22:49 : REQ : vlc : ################## Start Installomator v. 10.0beta3, date 2022-09-28 2022-09-28 15:22:49 : INFO : vlc : ################## Version: 10.0beta3 2022-09-28 15:22:49 : INFO : vlc : ################## Date: 2022-09-28 2022-09-28 15:22:49 : INFO : vlc : ################## vlc 2022-09-28 15:22:49 : INFO : vlc : BLOCKING_PROCESS_ACTION=tell_user 2022-09-28 15:22:49 : INFO : vlc : NOTIFY=success 2022-09-28 15:22:49 : INFO : vlc : LOGGING=INFO 2022-09-28 15:22:49 : INFO : vlc : LOGO=/System/Applications/App Store.app/Contents/Resources/AppIcon.icns 2022-09-28 15:22:49 : INFO : vlc : Label type: dmg 2022-09-28 15:22:49 : INFO : vlc : archiveName: VLC.dmg 2022-09-28 15:22:49 : INFO : vlc : no blocking processes defined, using VLC as default 2022-09-28 15:22:49 : INFO : vlc : App(s) found: /Applications/VLC.app 2022-09-28 15:22:49 : INFO : vlc : found app at /Applications/VLC.app, version 3.0.17.3, on versionKey CFBundleShortVersionString 2022-09-28 15:22:49 : INFO : vlc : appversion: 3.0.17.3 2022-09-28 15:22:49 : INFO : vlc : Latest version of VLC is 3.0.17.3 2022-09-28 15:22:49 : INFO : vlc : There is no newer version available. 2022-09-28 15:22:49 : INFO : vlc : App not closed, so no reopen. 2022-09-28 15:22:49 : REQ : vlc : No newer version. 2022-09-28 15:22:49 : REQ : vlc : ################## End Installomator, exit code 0 ``` --- fragments/labels/vlc.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fragments/labels/vlc.sh b/fragments/labels/vlc.sh index 8fe2487..dae2c67 100644 --- a/fragments/labels/vlc.sh +++ b/fragments/labels/vlc.sh @@ -3,10 +3,11 @@ vlc) type="dmg" if [[ $(arch) == "arm64" ]]; then downloadURL=$(curl -fs http://update.videolan.org/vlc/sparkle/vlc-arm64.xml | xpath '//rss/channel/item[last()]/enclosure/@url' 2>/dev/null | cut -d '"' -f 2 ) - appNewVersion=$(curl -fs http://update.videolan.org/vlc/sparkle/vlc-arm64.xml | xpath '//rss/channel/item[last()]/enclosure/@sparkle:version' 2>/dev/null | cut -d '"' -f 2 ) + #appNewVersion=$(curl -fs http://update.videolan.org/vlc/sparkle/vlc-arm64.xml | xpath '//rss/channel/item[last()]/enclosure/@sparkle:version' 2>/dev/null | cut -d '"' -f 2 ) elif [[ $(arch) == "i386" ]]; then downloadURL=$(curl -fs http://update.videolan.org/vlc/sparkle/vlc-intel64.xml | xpath '//rss/channel/item[last()]/enclosure/@url' 2>/dev/null | cut -d '"' -f 2 ) - appNewVersion=$(curl -fs http://update.videolan.org/vlc/sparkle/vlc-intel64.xml | xpath '//rss/channel/item[last()]/enclosure/@sparkle:version' 2>/dev/null | cut -d '"' -f 2 ) + #appNewVersion=$(curl -fs http://update.videolan.org/vlc/sparkle/vlc-intel64.xml | xpath '//rss/channel/item[last()]/enclosure/@sparkle:version' 2>/dev/null | cut -d '"' -f 2 ) fi + appNewVersion=$(echo ${downloadURL} | sed -E 's/.*\/vlc-([0-9.]*).*\.dmg/\1/' ) expectedTeamID="75GAHG3SZQ" ;;