autohelp-wrapper: support the create subcommand

This subcommand generates an initial flagmappings file.

Change-Id: Ic1b3b8605ebdbbb3bd5d1852174c9d2f260b6c93
This commit is contained in:
Gauvain Pocentek 2014-08-26 07:35:31 +02:00
parent d0e1a97df9
commit 1e6eab3eab
2 changed files with 12 additions and 2 deletions

View File

@ -8,7 +8,7 @@ Release notes
messages.
* ``autohelp.py``: Improve sanitizer, better support for i18n in projects.
* ``autohelp-wrapper``: Smarter handling of the manuals repo and environment
setup.
setup, add support for the ``create`` subcommand.
* ``diff_branches.py``: Updated output format.
0.18.1

View File

@ -29,6 +29,7 @@ usage() {
echo " $(basename $0) [ OPTIONS ] update|docbook|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 " setup: Install the environment only"
@ -127,7 +128,7 @@ ACTION=$1
shift
case $ACTION in
update|docbook|setup) ;;
create|update|docbook|setup) ;;
*)
usage
exit 1
@ -167,6 +168,15 @@ for project in $PROJECTS; do
fi
case $ACTION in
create)
[ "$project" = "swift" ] && continue
file=$MANUALSREPO/tools/autogenerate-config-flagmappings/$project.flagmappings
if [ -e $file ]; then
echo "$project.flagmappings already exists, ignoring."
continue
fi
$AUTOHELP create $project -i $SOURCESDIR/$project
;;
update)
[ "$project" = "swift" ] && continue
$AUTOHELP update $project -i $SOURCESDIR/$project