Update autohelp-wrapper to support RST output

Change-Id: If5829f7651a56f1651f4becc5af0744609d75310
This commit is contained in:
Gauvain Pocentek 2015-10-30 18:44:11 +09:00
parent cb7a132bcd
commit ec0626ab74
2 changed files with 12 additions and 3 deletions

View File

@ -5,6 +5,7 @@ Release notes
------
* Removed a virtual build and test environment based on Vagrant.
* Update ``autohelp-wrapper`` to support RST output.
0.31.0
------

View File

@ -29,12 +29,13 @@ FAST=0
usage() {
echo "Wrapper for autohelp.py"
echo "Usage:"
echo " $(basename $0) [ OPTIONS ] update|docbook|setup [ project1 ... ]"
echo " $(basename $0) [ OPTIONS ] create|update|docbook|rst|setup [ project1 ... ]"
echo
echo "Subcommands:"
echo " create: Create an initial flagmapping file"
echo " update: Update the flagmapping files"
echo " docbook: Generate the options tables"
echo " docbook: Generate the options tables in docbook format"
echo " rst: Generate the options tables in RST format"
echo " setup: Install the environment only"
echo
echo "Options:"
@ -139,7 +140,7 @@ ACTION=$1
shift
case $ACTION in
create|update|docbook|setup) ;;
create|update|docbook|rst|setup) ;;
*)
usage
exit 1
@ -245,5 +246,12 @@ for project in $PROJECTS; do
$AUTOHELP docbook $project -i $SOURCESDIR/$project/$project $extra_flags $AUTOOPT
fi
;;
rst)
if [ "$project" = "swift" ]; then
$EXTRACT_SWIFT rst -m $MANUALSREPO -s $SOURCESDIR/swift
else
$AUTOHELP rst $project -i $SOURCESDIR/$project/$project $extra_flags $AUTOOPT
fi
;;
esac
done