blob: 0e3dbcef4095fe105a28825c2e74f65a11ffcae5 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
|
#!/bin/sh
brpaste() {
host='https://brpaste.xyz'
[ $# -eq 0 ] && set -- '-'
brpaste_id=$(curl -#fF "data=<$1" "$host") \
|| { echo 'ERROR: Upload failed!' >&2 && exit 1; }
printf '%s/%s\n' "$host" "$brpaste_id"
}
return 0 2>/dev/null || brpaste "$@"
|