summary refs log tree commit diff
path: root/home/.local/bin/up
blob: 4f832a3c08d2c25131f9bf7d4f051e688031c83f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh
set -e -u

ts=$(date +%s)
rand=$(openssl rand -hex 4)
ext=${1##*.}
url=$(printf 'temp.causal.agency/%x%s.%s' "$ts" "$rand" "$ext")

scp -q "$1" "temp.causal.agency:/usr/local/www/$url"

echo "https://$url"
type pbcopy > /dev/null && printf "https://$url" | pbcopy