aboutsummaryrefslogtreecommitdiff
path: root/libs/common
diff options
context:
space:
mode:
Diffstat (limited to 'libs/common')
-rwxr-xr-xlibs/common18
1 files changed, 18 insertions, 0 deletions
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"