Skip to content
Snippets Groups Projects
Commit 4d2ca6b9 authored by Torbjörn Lönnemark's avatar Torbjörn Lönnemark
Browse files

Fix thinlinc client downloader

The download page without trailing slash now redirects to trailing
slash, and the page also contains the link to the .rpm twice.
parent 22742a5f
No related branches found
No related tags found
No related merge requests found
...@@ -6,13 +6,15 @@ cleanup() { ...@@ -6,13 +6,15 @@ cleanup() {
} }
trap cleanup 0 trap cleanup 0
set -o pipefail
ensure_client_downloaded() { ensure_client_downloaded() {
local url="$1" filename="$2" local url="$1" filename="$2"
[ -f "$filename" ] && return [ -f "$filename" ] && return
curl --silent --show-error -o "${WORKDIR}/${filename}" "$url" curl --silent --show-error -o "${WORKDIR}/${filename}" "$url"
} }
if ! latest_client_url="https://www.cendio.com$(curl --silent --show-error https://www.cendio.com/thinlinc/download | grep -Eo '/downloads/clients/thinlinc-client-[^"]+.x86_64.rpm')"; then if ! latest_client_url="https://www.cendio.com$(curl -L --silent --show-error https://www.cendio.com/thinlinc/download/ | grep -Eo '/downloads/clients/thinlinc-client-[^"]+.x86_64.rpm' | head -1)"; then
exit 1 exit 1
fi fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment