dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit f153fb689bbaa1bad14472d4901acde9ae956fef
parent d3655ba48a12967fcafa74d22b5d61db3c1125a9
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Mon, 11 Nov 2019 11:27:37 +0100

Auto-select download handler: hurl>curl>wget

Diffstat:
M.local/bin/upload | 10+++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/.local/bin/upload b/.local/bin/upload @@ -108,7 +108,15 @@ upload_file() { } download_file() { - curl --fail -OL "https://$host/files_nonpub/$1" + url="https://$host/files_nonpub/$1" + if type -v hurl >/dev/null 2>&1; then + hurl "$url" > ./$1 + elif type -v curl >/dev/null 2>&1; then + curl --fail -OL "$url" + elif type -v wget >/dev/null 2>&1; then + wget "$url" + fi + } delete_file() {