From 1e6eab3eab774b5fc63ae34c9eb629ea1382cdbc Mon Sep 17 00:00:00 2001 From: Gauvain Pocentek Date: Tue, 26 Aug 2014 07:35:31 +0200 Subject: [PATCH] autohelp-wrapper: support the create subcommand This subcommand generates an initial flagmappings file. Change-Id: Ic1b3b8605ebdbbb3bd5d1852174c9d2f260b6c93 --- RELEASE_NOTES.rst | 2 +- autogenerate_config_docs/autohelp-wrapper | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/RELEASE_NOTES.rst b/RELEASE_NOTES.rst index 9b4aa68b..6856259e 100644 --- a/RELEASE_NOTES.rst +++ b/RELEASE_NOTES.rst @@ -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 diff --git a/autogenerate_config_docs/autohelp-wrapper b/autogenerate_config_docs/autohelp-wrapper index 1e7c674b..a76513d6 100755 --- a/autogenerate_config_docs/autohelp-wrapper +++ b/autogenerate_config_docs/autohelp-wrapper @@ -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