mirror of
https://github.com/Ld-Hagen/fix-opera-linux-ffmpeg-widevine.git
synced 2025-12-29 03:23:00 +03:00
fix: correct jq syntax for fetching latest ffmpeg release URLs
This commit is contained in:
@@ -53,8 +53,8 @@ fi
|
||||
printf 'Getting download links...\n'
|
||||
|
||||
##ffmpeg
|
||||
readonly FFMPEG_URL_MAIN=$(curl -sL4 $FFMPEG_SRC_MAIN | jq -rS 'sort_by(.published_at).[-1].assets[0].browser_download_url')
|
||||
readonly FFMPEG_URL_ALT=$(curl -sL4 $FFMPEG_SRC_ALT | jq -rS 'sort_by(.published_at).[-1].assets[0].browser_download_url')
|
||||
readonly FFMPEG_URL_MAIN=$(curl -sL4 $FFMPEG_SRC_MAIN | jq -rS 'sort_by(.published_at) | .[-1].assets[0].browser_download_url')
|
||||
readonly FFMPEG_URL_ALT=$(curl -sL4 $FFMPEG_SRC_ALT | jq -rS 'sort_by(.published_at) | .[-1].assets[0].browser_download_url')
|
||||
[[ $(basename $FFMPEG_URL_ALT) < $(basename $FFMPEG_URL_MAIN) ]] && readonly FFMPEG_URL=$FFMPEG_URL_MAIN || readonly FFMPEG_URL=$FFMPEG_URL_ALT
|
||||
if [[ -z $FFMPEG_URL ]]; then
|
||||
printf 'Failed to get ffmpeg download URL. Exiting...\n'
|
||||
|
||||
Reference in New Issue
Block a user