aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/pasteme
blob: fe1f7206579a1cef47c6365cd46086d0332a3ba0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/bash

file="$1"

if [ "$file" == "" ]; then
    file=-
fi

sed '1s/^/content=/' "$file" \
    | curl -w '%{redirect_url}\n' \
        -X POST -H "Content-Type: text/plain; charset=UTF-8" \
        --data-binary @- http://paste.devys.org/