summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xcoin/provisioning/common/unix/DownloadURL.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/coin/provisioning/common/unix/DownloadURL.sh b/coin/provisioning/common/unix/DownloadURL.sh
index ac1fd971..5bafc33d 100755
--- a/coin/provisioning/common/unix/DownloadURL.sh
+++ b/coin/provisioning/common/unix/DownloadURL.sh
@@ -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