commit a9cff5b3e0b3aba425c5b45d357051bf2724924e
parent 73a346903e2d6d3292be2f97bf9372cc2576e88f
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Thu, 19 Mar 2020 09:54:12 +0100
Use ftp(1) if available
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/.local/bin/upload b/.local/bin/upload
@@ -131,7 +131,9 @@ download_file() {
if [ -e "$1" ]; then
die "error: file '$1' already exists, aboring"
fi
- if command -v hurl >/dev/null 2>&1; then
+ if command -v ftp >/dev/null 2>&1; then
+ ftp -M -V -o - "$url" > ./"$1"
+ elif command -v hurl >/dev/null 2>&1; then
hurl "$url" > ./"$1"
elif command -v curl >/dev/null 2>&1; then
curl --silent --fail -OL "$url"