Sha256: dae87a1c546054c1fb2a37dc93023514151475f3cd3bfeb8070722145e00fc2a
Contents?: true
Size: 1.52 KB
Versions: 11
Compression:
Stored size: 1.52 KB
Contents
#! /bin/bash # # mksite - Upload CZMQ manual to czmq.zeromq.org/manual: # # Author: Pieter Hintjens <ph@imatix.com> # License: public domain # # syntax: mksite # # Export so child scripts can access these export UPLOAD=1 # If 0, don't actually upload export CATEGORY=manual # Category to receive man pages export WEBSITE=czmq # Wikidot website prefix # This function uploads a file to wikidot # Error in upload will cause the script to exit with non-zero status function do_upload { ./wdput $WEBSITE $CATEGORY $1 $2 if [ $? != 0 ]; then echo "Error uploading file to wikidot" exit 1 fi } echo "Building docs..." make --quiet rm -f *.xml # Makefile does not detect version differences for XML for FILE in z*.txt; do ./mkman $FILE make `basename $FILE .txt`.xml done echo "Generating XML pages for manual..." FILES= for FILE in czmq.txt z*.txt; do BASE=`basename $FILE .txt` make --quiet $BASE.xml; FILES="$FILES $BASE" done echo "Generating Wikidot pages..." for FILE in $FILES; do perl ./xml2wd.pl $FILE.xml > $FILE.wd done if [ $UPLOAD -eq 1 ]; then echo "Uploading to $CATEGORY..." # Send table of contents as category:_start do_upload "_start" "CZMQ Documentation" # Now send individual man pages for FILE in $FILES; do TITLE=`egrep --after-context 1 PAGE_TITLE $FILE.wd | egrep $FILE` do_upload $FILE $TITLE done fi # Cleanup generated files rm _start.wd for FILE in $FILES; do rm $FILE.wd done
Version data entries
11 entries across 11 versions & 1 rubygems