Add upload-to-transfer
This commit is contained in:
parent
a96a4638d6
commit
65649e19e7
|
@ -0,0 +1,22 @@
|
|||
#!/bin/zsh
|
||||
# Uploads a file to transfer.archivete.am.
|
||||
# Usage: upload-to-transfer
|
||||
|
||||
# NEW for the uploaded file!
|
||||
if [[ -z "$1" ]] then
|
||||
echo "Usage: $0 <file to upload> [filename]"
|
||||
echo "If [filename] is not specified, it will default to the filename of the uploaded file."
|
||||
exit 1
|
||||
fi
|
||||
# WEN
|
||||
|
||||
hi=`basename $1`
|
||||
|
||||
if [[ -z "$2" ]] then
|
||||
echo hi
|
||||
2="$hi"
|
||||
else
|
||||
echo bye
|
||||
fi
|
||||
|
||||
curl --upload-file $1 https://transfer.archivete.am/$2 | less
|
Loading…
Reference in New Issue