From f1c378c027db012956d5e8a9585004250550d581 Mon Sep 17 00:00:00 2001 From: Andrew Robbins Date: Tue, 27 Jun 2017 05:33:18 -0400 Subject: Added functions for downloading/patching archives i.e., source tarballs are (partially) supported --- libs/common | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'libs/common') diff --git a/libs/common b/libs/common index d0fd1203..c5c89483 100755 --- a/libs/common +++ b/libs/common @@ -64,6 +64,24 @@ arguments_list() { done } +download_wrapper() { + local download_dir="$1" + shift + local uris=($@) + + # TODO: Add support for curl, in addition + # to wget, for compatibility reasons + wget_options=( + --config=/dev/null + --secure-protocol=PFS + --directory-prefix="${download_dir}" + --continue + -- + ) + + wget "${wget_options[@]}" "${uris[@]}" +} + diff_patch_file() { local repository_path="$1" local patch_file_path="$2" -- cgit v1.2.3-70-g09d2