DownloadURL last argument (targetFile) is now optional

Change-Id: I0864bcb052cddcc9753c056758b6e65fd561d928
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
This commit is contained in:
Dimitrios Apostolou
2019-11-05 12:09:12 +01:00
parent 569fd1dabc
commit 6cc2215b8c

View File

@@ -89,7 +89,14 @@ DownloadURL () {
url=$1
url2=$2
expectedHash=$3
targetFile=$4
# Optional argument $4: destination filename
if [ x"$4" = x ]
then
# defaults to the last component of $url
targetFile=$(echo $url | sed 's|^.*/||')
else
targetFile=$4
fi
if VerifyHash "$targetFile" "$expectedHash"
then