nnn/plugins/transfer
Arun Prakash Jana 1cca9e4b72
shellcheck fixes
2019-11-22 11:13:34 +05:30

17 lines
462 B
Bash
Executable file

#!/usr/bin/env sh
# Description: Upload a file to transfer.sh
#
# Shell: POSIX compliant
# Author: Arun Prakash Jana
if ! [ -z "$1" ]; then
# Upload the file, show the download link and wait till user presses any key
curl -s --upload-file "$1" https://transfer.sh/"$(basename "$1")"
echo
read -r _
# To write download link to "$1".loc and exit
# curl -s --upload-file "$1" https://transfer.sh/`basename "$1"` -o `basename "$1"`.loc
fi