aboutsummaryrefslogtreecommitdiff
path: root/tw_start
blob: 4140040131178bef5f530120377c973d78a695a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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