mirror of https://github.com/Cesura/pastey.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
343 B
16 lines
343 B
4 years ago
|
#!/bin/bash
|
||
|
|
||
|
if ! command -v curl &> /dev/null ; then
|
||
|
echo "Please install curl to use this script"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
PASTEY_ENDPOINT="{{ endpoint }}"
|
||
|
PASTEY_CONTENT=$(</dev/stdin)
|
||
|
|
||
|
# Submit paste
|
||
|
PASTEY_LINK=$(curl -s -X POST -H "Content-Type: text/plain" --data "${PASTEY_CONTENT}" "${PASTEY_ENDPOINT}")
|
||
|
|
||
|
# Print link
|
||
|
echo "${PASTEY_LINK}"
|