view paste.1 @ 4592:2c4e7296fa00

<oerjan> fetch http://oerjan.nvg.org/paste
author HackBot
date Sun, 20 Apr 2014 00:44:36 +0000
parents
children
line wrap: on
line source

#!/bin/bash
if [ "$1" ] && url "$1" 2>/dev/null # Save making a file when it already exists.
then
else
    PASTENUM="$RANDOM"

    mkdir -p $HACKENV/paste

    url paste/paste."$PASTENUM"
    cat -- "${1--}" > $HACKENV/paste/paste."$PASTENUM"
fi