Documentation: clean up the makefile
[guilt.git] / guilt-help
blob93442a31c2fc3d85d6ebda573c444d0971c31f69
1 #!/bin/sh
3 # Copyright (c) Josef "Jeff" Sipek, 2007-2013
6 DO_NOT_CHECK_BRANCH_EXISTENCE=1
8 USAGE="[<command> | <topic>]"
9 if [ -z "$GUILT_VERSION" ]; then
10 echo "Invoking `basename "$0"` directly is no longer supported." >&2
11 exit 1
14 _main() {
16 case $# in
18 page="guilt"
21 case "$1" in
22 guilt*)
23 # guilt --help
24 # guilt-cmd --help
25 # guilt-help guilt-foo
26 page="$1" ;;
28 # guilt-help foo
29 page="guilt-$1" ;;
30 esac
33 usage
35 esac
37 MANDIR=`dirname $0`/../man
38 MANDIR=`(cd "$MANDIR"; pwd)`
39 exec man -M "$MANDIR" "$page"