aboutsummaryrefslogtreecommitdiffstats
path: root/coin/provisioning/common/unix/DownloadURL.sh
Commit message (Collapse)AuthorAgeFilesLines
* Fix shellcheck problemsTony Sarajärvi14 days1-1/+1
| | | | | Change-Id: I277fd923f62aa5888d7e18c89471909732da30e5 Reviewed-by: Liang Qi <liang.qi@qt.io>
* Coin: check hash exists after calculationToni Saario2024-01-311-2/+2
| | | | | | | | | | | | | When the catch all is hit the exit statement only returns from the case statement. Remove the exit statement. Check that some sha was returned, otherwise empty input sha will result in empty calculated sha, which causes false positive sha check. Pick-to: 6.7 Change-Id: Iddb9562cf7e12f695e21ca63b302c9217fc98aab Reviewed-by: Dimitrios Apostolou <jimis@qt.io>
* Fix shellcheck complaints about provisioning scriptsTony Sarajärvi2023-09-131-6/+9
| | | | | | | | Also adds executable attributes to shell scripts that were missing it. Change-Id: Id52ef495147fdbfb5cb1a1f711fac530e0e85f3b Reviewed-by: Jukka Jokiniva <jukka.jokiniva@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Use SPDX license identifiersLucie Gérard2023-06-121-39/+2
| | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. License files are organized under LICENSES directory. Pick-to: 6.5 6.6 Task-number: QTBUG-67283 Task-number: QTBUG-108364 Change-Id: If26e4d35c780db4a7982bb84872b251dad24716e Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Replace LGPL2.1 only header with LGPL3 oneKai Köhne2021-12-191-13/+19
| | | | | | | | | This is in line with e.g. qtbase. Also remove outdated/unreferenced license files. Pick-to: 6.3 Change-Id: I5d3370ab453610f9c8165ff9e57db7ad4a785370 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* 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>