From f135a30c0c95b84eb62b157f6ff454866b250fce Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Sun, 24 Mar 2019 17:38:29 +0530 Subject: Add script to upload a file to transfer.sh --- user-scripts/transfer | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 user-scripts/transfer (limited to 'user-scripts/transfer') diff --git a/user-scripts/transfer b/user-scripts/transfer new file mode 100755 index 0000000..7201b0b --- /dev/null +++ b/user-scripts/transfer @@ -0,0 +1,16 @@ +#!/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 input + + # To write download link to "$1".loc and exit + # curl -s --upload-file "$1" https://transfer.sh/`basename "$1"` -o `basename "$1"`.loc +fi -- cgit v1.2.3-70-g09d2