Index: build/build_web_manpages ================================================================== --- build/build_web_manpages +++ build/build_web_manpages @@ -5,10 +5,31 @@ if [ ! -f libconfig.3 ]; then echo 'Could not find libconfig.3, aborting.' >&2 exit 1 fi + +LIBCONFIG_H_SHA1="$(fossil sha1 libconfig.h | awk '{ print $1 }')" for file in lc_cleanup lc_geterrno lc_geterrstr lc_seterrstr lc_process lc_process_file lc_register_callback lc_register_var libconfig lc_handle_type; do man2html -H "REPLACE" -M "/ME" < ${file}.3 | grep -iv '^Content-Type:' | sed 's@"http://REPLACE/ME?\([0-9]*\)+\([^"]*\)"@"\2.htm"@;s@http://REPLACE/ME@@g' > /web/rkeene/docs/oss/libconfig/${file}.htm -done + + if [ "${file}" = 'libconfig' ]; then + wikipage='Manual' + else + wikipage="Manual for ${file}" + fi + ( + echo '

NAME

' + man2html -H linux.die.net -M /man -p "${file}.3" | \ + sed '0,/

NAME<\/H2>/ d;/

Index<\/H2>/,$ d;s@Return to Main Contents@@;s@\[@\[@;s@\]@\]@' | \ + sed 's@file:/usr/include/libconfig.h@artifact/'"${LIBCONFIG_H_SHA1}"'@' | \ + sed '$ d;/^ *$/ d' | \ + sed 's@\(http://linux.die.net/man/[^+]*\)+@\1/@' | \ + sed 's@http://linux.die.net/man/3/lc_@wiki/Manual for lc_@g;s@http://linux.die.net/man/3/libconfig@wiki/Manual@' + ) | ( + fossil wiki commit "${wikipage}" || \ + ( fossil wiki create "${wikipage}" && fossil wiki commit "${wikipage}" ) + ) +done +fossil sync