diff options
author | tdback <tyler@tdback.net> | 2024-12-04 18:50:37 -0500 |
---|---|---|
committer | tdback <tyler@tdback.net> | 2024-12-04 18:50:37 -0500 |
commit | 58347fdfe21315ad3ccc0bd7c4703a8ec7aae797 (patch) | |
tree | 393fe8d69962e070c522e889b672ee9e97a88207 /tw_start |
initial commit to new repo
Diffstat (limited to 'tw_start')
-rwxr-xr-x | tw_start | 15 |
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 |