annotate bin/paste @ 12268:6bbbe2a95120 draft

<b_jonas> slashlearn euclid//Euclid is a short geeky game in which the goal is to do Euclidean compass and straightedge constructions in as few steps as possible. It runs in the browser, found at "http://www.euclidthegame.com/". It was popular among #esoteric regulars in 2016-07.
author HackEso <hackeso@esolangs.org>
date Mon, 16 Dec 2019 23:02:52 +0000
parents 0d78afb61c51
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5643
56dcce63901b <tswett> revert
HackBot
parents:
diff changeset
1 #!/bin/bash
56dcce63901b <tswett> revert
HackBot
parents:
diff changeset
2 if [ "$1" ] && url "$1" 2>/dev/null # Save making a file when it already exists.
56dcce63901b <tswett> revert
HackBot
parents:
diff changeset
3 then
56dcce63901b <tswett> revert
HackBot
parents:
diff changeset
4 true
56dcce63901b <tswett> revert
HackBot
parents:
diff changeset
5 else
56dcce63901b <tswett> revert
HackBot
parents:
diff changeset
6 PASTENUM="$RANDOM"
56dcce63901b <tswett> revert
HackBot
parents:
diff changeset
7
10286
916b38c83c3b <fizzie> sled bin/paste//s,\\(HACKENV/\\|url \\)paste,\\1tmp/paste,
HackBot
parents: 5643
diff changeset
8 mkdir -p $HACKENV/tmp/paste
5643
56dcce63901b <tswett> revert
HackBot
parents:
diff changeset
9
12051
0d78afb61c51 <fizzie> sled /hackenv/bin/paste//s|url tmp|url $HACKENV/tmp|
HackEso <hackeso@esolangs.org>
parents: 10286
diff changeset
10 url $HACKENV/tmp/paste/paste."$PASTENUM"
10286
916b38c83c3b <fizzie> sled bin/paste//s,\\(HACKENV/\\|url \\)paste,\\1tmp/paste,
HackBot
parents: 5643
diff changeset
11 cat -- "${1--}" > $HACKENV/tmp/paste/paste."$PASTENUM"
5643
56dcce63901b <tswett> revert
HackBot
parents:
diff changeset
12 fi