Browse Source

Merge 5ab7725641 into 6d68ad982f

pull/72/merge
Arinerron 7 years ago
committed by GitHub
parent
commit
f84151dc3c
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      transfersh-web/index.html

+ 1
- 1
transfersh-web/index.html View File

@@ -150,7 +150,7 @@ include "includes/head.html"
<div class="terminal">
<code>
<span class="code-title"># Add this to .bashrc or its equivalent</span>
<br/>transfer() { if [ $# -eq 0 ]; then echo "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md"; return 1; fi <br/>tmpfile=$( mktemp -t transferXXX ); if tty -s; then basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9._-]/-/g'); curl --progress-bar --upload-file "$1" "https://transfer.sh/$basefile" >> $tmpfile; else curl --progress-bar --upload-file "-" "https://transfer.sh/$1" >> $tmpfile ; fi; cat $tmpfile; rm -f $tmpfile; }
<br/>transfer() { if [ $# -eq 0 ]; then echo -e "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md"; return 1; fi <br/>tmpfile=$( mktemp -t transferXXX ); if tty -s; then basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9._-]/-/g'); curl --progress-bar --upload-file "$1" "https://transfer.sh/$basefile" >> $tmpfile; else curl --progress-bar --upload-file "-" "https://transfer.sh/$1" >> $tmpfile ; fi; cat $tmpfile; rm -f $tmpfile; }
<br/>
<br/>
<span class="code-title"># Now you can use transfer command</span>


Loading…
Cancel
Save