bin/pastebin @ c29a6ab95e91

A bit more remote stuff
author Steve Losh <steve@stevelosh.com>
date Fri, 17 Jan 2020 22:09:22 -0500
parents a47b90b61621
children 8d1c68b94471
#!/usr/bin/env bash

set -euo pipefail

PASTE_SHA=$(ssh paste.stevelosh.com 'cat > tmppaste && sha1sum tmppaste | cut -d" " -f1 && mv tmppaste /var/www/paste/`sha1sum tmppaste | cut -d" " -f1`')

echo -n "https://paste.stevelosh.com/$PASTE_SHA" | pbcopy
echo -n 'Copied '
tput bold
pbpaste
tput sgr0
echo ' to the clipboard.'