From c8c40cff21513ee494125c690be5da8f0d67a737 Mon Sep 17 00:00:00 2001 From: "Yamashita, Yuu" Date: Wed, 1 Jun 2016 06:55:59 +0000 Subject: [PATCH] Write remote content on stdout with `aria2c` (fixes #619, #534) `aria2c` doesn't support writing content to stdout. As a workaround, this patch will use temporary file then write content on stdout once finished downloading. --- plugins/python-build/bin/python-build | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/python-build/bin/python-build b/plugins/python-build/bin/python-build index 962ba401..4b0deb59 100755 --- a/plugins/python-build/bin/python-build +++ b/plugins/python-build/bin/python-build @@ -340,7 +340,9 @@ http_head_aria2c() { } http_get_aria2c() { - aria2c -o "${2:--}" ${ARIA2_OPTS} "$1" + local out="${2:-$(mktemp "out.XXXXXX")}" + aria2c --allow-overwrite=true -o "${out}" ${ARIA2_OPTS} "$1" >&4 + [ -n "$2" ] || cat "${out}" } http_head_curl() {