aboutsummaryrefslogtreecommitdiffstats
path: root/coin/provisioning/common/unix/DownloadURL.sh
Commit message (Collapse)AuthorAgeFilesLines
* Do not complain about existing empty filesDimitrios Apostolou2020-02-151-12/+19
| | | | | | | | Sometimes we pre-create the target filename using mktemp. In that case of course the hash will not match, so avoid comparing. Change-Id: Id0feb0178d659e03f5ceb000f738167cdc28a3ec Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
* Alias expansion is not working reliably in non-interactive shellsDimitrios Apostolou2020-02-151-4/+6
| | | | | | | | | | | It happened that old bash version on macOS the alias was not being expanded for non-interactive shells running under "bash" but was being expanded fine when under "sh". Using functions is the recommended way. Here we define a function conditionally. Change-Id: I607b265cb9e88b2b529ed170121e5a0833003acd Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
* DownloadURL last argument (targetFile) is now optionalDimitrios Apostolou2019-11-141-1/+8
| | | | | Change-Id: I0864bcb052cddcc9753c056758b6e65fd561d928 Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
* Fix for DownloadURL to try alternative URLDimitrios Apostolou2019-10-151-2/+2
| | | | | Change-Id: I7e9a77815ef8f4c258dda44bda6fdd4eb3736ef4 Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
* DownloadURL now works with either wget or curlDimitrios Apostolou2019-09-271-2/+11
| | | | | | | | | The reason is that Ubuntu does not have curl at the very beginning of provisioning scripts, and also does not have the repositories configured in order to install it. Change-Id: Ia485c1672f894bc800f199b742d238b2945938e5 Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
* Refactor DownloadURL.shDimitrios Apostolou2019-09-261-23/+61
| | | | | | | | | | | | Auto-detects and verifies all kinds of hashes, not only SHA1. Hash verification is now an autonomous function. If the file is found at the destination, skip redownloading it if the hash is OK. Runs on POSIX sh, not requiring bash. Retain compatibility with previous version. Change-Id: I9930336030aa776f49dc460fe766f3e831700255 Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
* Fix broken provisioning script DownloadURL.shJuha Karjalainen2019-01-091-3/+5
| | | | | | | | DownloadURL returns 0 even when alt download fails. Task-number: QTQAINFRA-2501 Change-Id: Id2fb1e0b4ff12a48b6adb27291f55fc129296233 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Change 'test suite' in license headers of prov scriptsTony Sarajärvi2018-09-041-1/+1
| | | | | Change-Id: I9687bcb15b26287ea6eeb2098079137d6e3fc288 Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
* Fix shellcheck complaints in provisioning scriptsTony Sarajärvi2018-04-291-3/+3
| | | | | | Change-Id: I38306c6d2ff360dc12f8c33b289bbc4ae4935aca Reviewed-by: Joni Jäntti <joni.jantti@qt.io> Reviewed-by: Simo Fält <simo.falt@qt.io>
* Provisioning: Remove sha1 file after shasum checkHeikki Halmet2018-04-151-0/+1
| | | | | Change-Id: Iee8e66d98e5ebd2dee18baf8e1752a86065417d1 Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
* Simplify DownloadURLJędrzej Nowacki2018-03-141-38/+8
| | | | | | | | | | | | | The script was over-engineered. The new version provides the same functionality while removing uninteresting postmortem messages. In addition try_catch.sh has a bug that injects set +e to a sourcing script which was propagating through DownloadURL.sh to almost all provisioning scripts. So it is good to avoid using it. Change-Id: If191a0dcf52a29c4bec580a254e8e58a00130f6d Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Provisioning: Create symbolic for shasum tool on macOS for compatibilityRainer Keller2018-03-101-1/+1
| | | | | | | | | | | On macOS the sha1 tool is named 'shasum' while on all other unix systems it is called 'sha1sum'. In order to make all unix provisioning scripts run on macOS without special case handling a symbolic link is created. Change-Id: Ib1365cbb0dcb31e68a22959ce939fb450ec7e3f7 Reviewed-by: Joni Jäntti <joni.jantti@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Simo Fält <simo.falt@qt.io>
* Split Common folder based on operating system familiesHeikki Halmet2018-01-101-0/+90
This change will split common folder to four different folders: Linux, Unix, Windows and MacOS. Each of these folders includes scripts which are common for their operating system familes Task-number: QTQAINFRA-1451 Change-Id: Ic93b2183052335dee875d1452b21e38d268b6474 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>