commit c3d8129e0f2b51a54dda75388656d63025ddbf77
parent cfbd28207cd3b4f86b234930b2a8103107ce1906
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Wed, 17 Mar 2021 14:15:34 +0100
upload: change order of download handlers: hurl(1) -> curl(1) -> ftp(1)
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/.local/bin/upload b/.local/bin/upload
@@ -138,12 +138,12 @@ download_file() {
if [ -e "$1" ]; then
die "error: file '$1' already exists, aboring"
fi
- if command -v ftp >/dev/null 2>&1; then
- ftp -M -V -o - "$url" > ./"$1"
- elif command -v hurl >/dev/null 2>&1; then
+ if 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"
+ elif command -v ftp >/dev/null 2>&1; then
+ ftp -M -V -o - "$url" > ./"$1"
elif command -v wget >/dev/null 2>&1; then
wget "$url"
else