summaryrefslogtreecommitdiff
path: root/bin/ups
blob: 8353f4488d889dab2780a71daedab996e0332480 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/bash
# ups.khirnov.net uploader

if [ "$1" ]; then
    fname=$(basename "$1")
else
    fname="-"
fi

url=$(curl -sS -E ~/.local/var/up/cert --data-binary "@${fname}" "https://ups.khirnov.net/${fname}")
[ "${url}" ] && echo "${url}"