static generator
[mdref/mdref] / bin / cli-server
index 15b4b55939fea41497b6436e11b4d7c271df8e96..30373f82904fd6e4ad2be357f003bdda8beba0d2 100755 (executable)
@@ -35,13 +35,16 @@ then
        printf "\t          list of those (optional, multiple)\n\n"
        printf "Environment:\n"
        printf "\tREFPATH   colon separated list of refpaths\n\n"
-       printf "At least one refpath must be given, either through the environment "
-       printf "with REFPATH or as command line argument.\n\n"
+       printf "Examples:\n"
+       printf "\t\$ REFPATH=refs/foo:refs/bar ./bin/cli-server\n\n"
+       printf "\t\$ ./bin/cli-server refs/*\n\n"
+       printf "\tAt least one refpath must be given, either through the environment\n"
+       printf "\twith REFPATH or as command line argument.\n\n"
        exit 1
 fi
 
 export REFPATH
 
 for p in {8000..8100}; do
-       php -S localhost:$p -t . index.php && break
+       ${PHP:-php} -S localhost:$p -t . index.php && break
 done