scripts/tw_start

15 lines
361 B
Bash
Executable file

#!/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