diff options
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 |