scripts/tw_start

16 lines
361 B
Text
Raw Permalink Normal View History

2024-11-12 19:39:05 -05:00
#!/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