Notice: the grml team is migrating from Mercurial to Git.
Please visit git.grml.org instead!
| author | Michael Gebetsroither <michael.geb@gmx.at> |
| Sun Mar 30 15:26:52 2008 +0200 (7 months ago) | |
| changeset 56 | aaf872eeb81c |
| manifest | aaf872eeb81c |
| parent 55 | 3a6bed4aad8d |
| child 57 | 7e2cbab72300 |
--- a/files/hg-autodoc Sun Mar 30 14:20:46 2008 +0200+++ b/files/hg-autodoc Sun Mar 30 15:26:52 2008 +0200@@ -4,6 +4,10 @@ FORCE_REBUILD_='false'FORCE_REBUILD_='false'OPT_IGNORE_FILE_=''OPT_EXCLUDE_=''+OPT_TOCFILE_='/dev/null'++# global var which holds the repo currently processed+BASEREPO_=''function printUsage{@@ -11,10 +15,16 @@ Usage: $PROG_NAME [Options] <destinationUsage: $PROG_NAME [Options] <destination of doc files> <source>Options:- -f Force rebuild of dokumentation cache- -e Exclude given projects (<p1>,<p2>, ...)- -i Ignorefile (one project to ignore per line)- -h This help text+ -f Force rebuild of dokumentation cache+ -e Exclude given projects (<p1>,<p2>, ...)+ -i <file> Ignorefile (one project to ignore per line)+ -t <file> Create helpfile for toc creation (default: /dev/null)+ -h This help text++Toc helpfile:+ Consist of one entry per line:+ <repository> <html-file> <future tags>+EOT# -i Ignore files (not implemented yet)}@@ -26,11 +36,12 @@ function die()exit 1}-while getopts "fi:e:h" opt; do+while getopts "fi:e:t:h" opt; docase "$opt" inf) FORCE_REBUILD_='true' ;;i) OPT_IGNORE_FILE_="$OPTARG" ;;e) OPT_EXCLUDE_="$OPTARG" ;;+ t) OPT_TOCFILE_="$OPTARG" ;;h) printUsage; exit 0 ;;?) die "E: Unknown option \"$opt\"" ;;esac@@ -63,7 +74,7 @@ function copyhtmlasciidoc -b xhtml11 -o "$DST/`basename $htmlfile`" $1returnfi- cp -uv $htmlfile $DST+ cp -uv $htmlfile $DST |grep -q ' -> ' && echo "$BASEREPO_ $htmlfile" >>$OPT_TOCFILE_}function processDir@@ -101,6 +112,7 @@ hg-reposearch "$SRC" |while read repo_;fipushd $repo_ >/dev/null || continue+ BASEREPO_="$baserepo_"# process valied packagesfor target_ in "Makefile" "docs/Makefile" "doc/Makefile"; do@@ -119,5 +131,6 @@ hg-reposearch "$SRC" |while read repo_;cp -ru images $DSTfi+ BASEREPO_=''popd >/dev/null || exit $?done