From 58347fdfe21315ad3ccc0bd7c4703a8ec7aae797 Mon Sep 17 00:00:00 2001 From: tdback Date: Wed, 4 Dec 2024 18:50:37 -0500 Subject: initial commit to new repo --- tw_start | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 tw_start (limited to 'tw_start') diff --git a/tw_start b/tw_start new file mode 100755 index 0000000..4140040 --- /dev/null +++ b/tw_start @@ -0,0 +1,15 @@ +#!/bin/sh + +# tw_start: Start a specified tiddlywiki on port 8080. + +yell() { echo "$0: $*" >&2; } +die() { yell "$*"; exit 111; } +try() { "$@" || die "cannot $*"; } + +WIKI="$HOME/wikis/$1" + +[ "$#" -eq 0 ] && die "Please specify a tiddlywiki... quitting;" + +[ ! -e "$WIKI" ] && die "Tiddlywiki '$WIKI' does not exist... quitting;" + +try tiddlywiki "$WIKI" --listen -- cgit v1.2.3