diff options
author | Ralf Habacker <ralf.habacker@freenet.de> | 2022-03-29 09:59:59 +0200 |
---|---|---|
committer | Simon McVittie <smcv@collabora.com> | 2022-09-13 16:08:34 +0100 |
commit | 182eafb3a20df121a7201cde8b7f5a6efb993b59 (patch) | |
tree | ce3991c553734a3322c0342ccce480554a99bae9 | |
parent | 1b013547130fc0350503483210a81a44fa5da5b6 (diff) | |
download | dbus-182eafb3a20df121a7201cde8b7f5a6efb993b59.tar.gz |
tools/ci-install.sh: clean up the previously used installation prefix and the downloaded mingw packages
This is necessary to have a clean initial state when running the script
locally.
Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
(cherry picked from commit 067733d4b0e7c9c03ee25cb85eecb80980f01f68)
-rwxr-xr-x | tools/ci-install.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/ci-install.sh b/tools/ci-install.sh index 362ed05c..ac0ae95d 100755 --- a/tools/ci-install.sh +++ b/tools/ci-install.sh @@ -195,6 +195,8 @@ if [ "$ci_local_packages" = yes ]; then (*-w64-mingw32) mirror=https://repo.msys2.org/mingw/${ci_host%%-*} dep_prefix=$(pwd)/${ci_host}-prefix + # clean install dir, if present + rm -rf ${dep_prefix} install -d "${dep_prefix}" wget -O files.lst ${mirror} sed 's,^<a href=",,g;s,">.*$,,g' files.lst | grep -v "\.db" | grep -v "\.files" | grep ".*zst$" | sort > filenames.lst @@ -217,6 +219,11 @@ if [ "$ci_local_packages" = yes ]; then echo "could not find filename for package '${pkg}'" exit 1 fi + # Remove previously downloaded file, which can happen + # when run locally + if [ -f ${filename} ]; then + rm -rf ${filename} + fi wget ${mirror}/${filename} tar -C ${dep_prefix} --strip-components=1 -xvf ${filename} done |