summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2019-05-27 17:19:14 +0200
committerSimon Rettberg2019-05-27 17:19:14 +0200
commit6a0ae1fd04014fd04d199e4da7c103bf0e702408 (patch)
tree97ff287bb14df5f345475e683603f28152e0595e
parentModularize (diff)
downloadslx-tools-6a0ae1fd04014fd04d199e4da7c103bf0e702408.tar.gz
slx-tools-6a0ae1fd04014fd04d199e4da7c103bf0e702408.tar.xz
slx-tools-6a0ae1fd04014fd04d199e4da7c103bf0e702408.zip
Add download and download_retry
-rw-r--r--modules/download.inc10
1 files changed, 10 insertions, 0 deletions
diff --git a/modules/download.inc b/modules/download.inc
new file mode 100644
index 0000000..bbe4aae
--- /dev/null
+++ b/modules/download.inc
@@ -0,0 +1,10 @@
+#!/bin/ash
+
+download() {
+ curl --location --max-redirs 5 --max-time 7 --connect-timeout 2 "$@"
+}
+
+ownload_retry() {
+ download --retry 3 --retry-max-time 12 "$@"
+}
+