From 1919d0860f5836560b2db5e2997f362945847bac Mon Sep 17 00:00:00 2001 From: Remco Date: Thu, 13 Nov 2014 00:09:45 +0100 Subject: [PATCH] fix for transfer alias --- transfersh-web/index.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/transfersh-web/index.html b/transfersh-web/index.html index 5939a92..6c51eca 100644 --- a/transfersh-web/index.html +++ b/transfersh-web/index.html @@ -147,7 +147,8 @@ include "includes/head.html" # Add this to .bashrc or its equivalent
transfer() {
# write to output to tmpfile because of progress bar -
tmpfile=$( mktemp -t transferXXX ); curl --progress-bar --upload-file $1 https://transfer.sh/$(basename $1) >> $tmpfile; cat $tmpfile; rm -f $tmpfile; } +
tmpfile=$( mktemp -t transferXXX ); basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9]/-/g'); curl --progress-bar --upload-file "$1" "https://transfer.sh/$basefile" >> $tmpfile; cat $tmpfile; rm -f $tmpfile; +
}

alias transfer=transfer