mirror of
https://github.com/mrworf/plexupdate.git
synced 2025-07-08 06:00:52 -07:00
Added -m1 to last grep in RELEASe
We cannot handle the case where our filtering ends up with multiple results at the very end, so make sure grep only returns the first match. Fixes #99
This commit is contained in:
parent
b6f1f5bb2e
commit
2e3fa58e30
1 changed files with 1 additions and 1 deletions
|
@ -454,7 +454,7 @@ fi
|
|||
echo -n "Finding download URL to download..."
|
||||
|
||||
# Set "X-Plex-Token" to the auth token, if no token is specified or it is invalid, the list will return public downloads by default
|
||||
RELEASE=$(wget --header "X-Plex-Token:"${TOKEN}"" --load-cookies /tmp/kaka --save-cookies /tmp/kaka --keep-session-cookies "${URL_DOWNLOAD}" -O - 2>/dev/null | grep -ioe '"label"[^}]*' | grep -i "\"distro\":\"${DISTRO}\"" | grep -i "\"build\":\"${BUILD}\"")
|
||||
RELEASE=$(wget --header "X-Plex-Token:"${TOKEN}"" --load-cookies /tmp/kaka --save-cookies /tmp/kaka --keep-session-cookies "${URL_DOWNLOAD}" -O - 2>/dev/null | grep -ioe '"label"[^}]*' | grep -i "\"distro\":\"${DISTRO}\"" | grep -m1 -i "\"build\":\"${BUILD}\"")
|
||||
DOWNLOAD=$(echo ${RELEASE} | grep -m1 -ioe 'https://[^\"]*')
|
||||
CHECKSUM=$(echo ${RELEASE} | grep -ioe '\"checksum\"\:\"[^\"]*' | sed 's/\"checksum\"\:\"//')
|
||||
echo "OK"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue