changeset 4594:aca3e93dfaf3

<oerjan> fetch http://oerjan.nvg.org/paste
author HackBot
date Sun, 20 Apr 2014 00:45:41 +0000
parents 1f40eeeac13c
children 12187f01893f
files paste.2
diffstat 1 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/paste.2	Sun Apr 20 00:45:41 2014 +0000
@@ -0,0 +1,12 @@
+#!/bin/bash
+if [ "$1" ] && url "$1" 2>/dev/null # Save making a file when it already exists.
+then
+    true
+else
+    PASTENUM="$RANDOM"
+
+    mkdir -p $HACKENV/paste
+
+    url paste/paste."$PASTENUM"
+    cat -- "${1--}" > $HACKENV/paste/paste."$PASTENUM"
+fi