1
0
mirror of https://github.com/dutchcoders/transfer.sh.git synced 2020-11-18 19:53:40 -08:00

fix for transfer alias

This commit is contained in:
Remco 2014-11-13 00:09:45 +01:00
parent 952f13634e
commit 1919d0860f

View File

@ -147,7 +147,8 @@ include "includes/head.html"
<span class="code-title"># Add this to .bashrc or its equivalent</span> <span class="code-title"># Add this to .bashrc or its equivalent</span>
<br/>transfer() { <br/>transfer() {
<br># write to output to tmpfile because of progress bar <br># write to output to tmpfile because of progress bar
<br>tmpfile=$( mktemp -t transferXXX ); curl --progress-bar --upload-file $1 https://transfer.sh/$(basename $1) >> $tmpfile; cat $tmpfile; rm -f $tmpfile; } <br>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;
<br/>}
<br/> <br/>
<br/>alias transfer=transfer <br/>alias transfer=transfer
<br/> <br/>