7 cd $
(dirname $0)/..
/public
11 if test ${path:0:1} != "/"
13 REFPATH
="$OWD/$path$REFPATH"
15 REFPATH
="$path$REFPATH"
20 if test $# -gt 0; then
24 while test $# -gt 0; do
32 printf "Usage:\n\t%s [refpath] ...\n\n" "$(basename $0)"
33 printf "Parameters:\n"
34 printf "\trefpath path to a markdown reference tree or a colon separated\n"
35 printf "\t list of those (optional, multiple)\n\n"
36 printf "Environment:\n"
37 printf "\tREFPATH colon separated list of refpaths\n\n"
39 printf "\t\$ REFPATH=refs/foo:refs/bar ./bin/cli-server\n\n"
40 printf "\t\$ ./bin/cli-server refs/*\n\n"
41 printf "\tAt least one refpath must be given, either through the environment\n"
42 printf "\twith REFPATH or as command line argument.\n\n"
48 for p
in {8000.
.8100}; do
49 ${PHP:-php} -S localhost
:$p -t . index.php
&& break