extract common download
sgraves/cpp-build-system_msys2/pipeline/head Build queued...
sgraves/cpp-build-system_mac/pipeline/head Build queued...
sgraves/cpp-build-system/pipeline/head Build queued...

This commit is contained in:
sgraves committed 2026-01-10 17:01:19 -06:00
1 parent d219cb8b2c
commit fda2ed99ee
3 files changed
+23 -8

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
#!/usr/bin/env bash
WGET_OPTS="--tries=5 --waitretry=5"
function remove_file() {
if [ -f "$1" ]; then
rm -f "$1"
fi
}
function download_file() {
remove_file "$2"
if wget ${WGET_OPTS} "$1" -O "$2"; then
return 0
fi
remove_file "$2"
return 1
}