#!/usr/bin/bash # SPDX-License-Identifier: CC0-1.0 # shrik3's ad-hoc pastebin # USAGE : just pipe some output to this script # echo "hello" | paste.sh ################################################################## echo "YOU ARE NOT RUNNING A RAMDOM SCRIPT FROM INTERNET, ARE YOU?" exit 1 ################################################################## # url prefix, depends on webserver settings URL_ROOT="https://vnoid.de/~shrik3/volatile" # documentation root on local fs DOC_ROOT="/home/shrik3/docs/blog/vnoid_home" # where are pastes stored PB_ROOT=$DOC_ROOT/volatile/ # documentation root on remote server REMOTE=shrik3@vnoid:~/www/ # random string for fileneme NAME="$(tr -dc A-Za-z0-9 "${FILEPATH}" deploy echo "${bold}${URL}${normal}"