aboutsummaryrefslogtreecommitdiff
path: root/tw_start
diff options
context:
space:
mode:
authortdback <tyler@tdback.net>2024-12-04 18:50:37 -0500
committertdback <tyler@tdback.net>2024-12-04 18:50:37 -0500
commit58347fdfe21315ad3ccc0bd7c4703a8ec7aae797 (patch)
tree393fe8d69962e070c522e889b672ee9e97a88207 /tw_start
initial commit to new repo
Diffstat (limited to 'tw_start')
-rwxr-xr-xtw_start15
1 files changed, 15 insertions, 0 deletions
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