Add upload-to-transfer

This commit is contained in:
TheTechRobo 2022-09-10 12:29:40 -04:00
parent a96a4638d6
commit 65649e19e7
1 changed files with 22 additions and 0 deletions

22
upload-to-transfer Normal file
View File

@ -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