Fathi Boudra | 422bf77 | 2019-12-02 11:10:16 +0200 | [diff] [blame^] | 1 | #!/bin/bash |
| 2 | # |
| 3 | # Copyright (c) 2019, Arm Limited. All rights reserved. |
| 4 | # |
| 5 | # SPDX-License-Identifier: BSD-3-Clause |
| 6 | # |
| 7 | |
| 8 | # Given the name of the release (e.g., 18.04), this script downloads all |
| 9 | # Linaro release archives to the current directory, verifies, extracts, and |
| 10 | # finally removes the archive files. |
| 11 | |
| 12 | set -e |
| 13 | |
| 14 | # Download all ZIP files from the chosen Linaro release |
| 15 | time wget -q -c -m -A .zip -np -nd "https://releases.linaro.org/members/arm/platforms/${1:?}/" |
| 16 | |
| 17 | # Uncompress each ZIP file in its own directory (named after the ZIP file) |
| 18 | for zipfile in $(echo *.zip); do |
| 19 | echo |
| 20 | echo "Uncompressing file $zipfile" |
| 21 | |
| 22 | unzip -d "${zipfile%.zip}" "$zipfile" |
| 23 | done |
| 24 | |
| 25 | rm -f *.zip |