X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=build-aux%2Fgnu-web-doc-update;h=268ecc068df9a6897d9949180d501f1b31fab5f0;hb=43593319b31e6b0175b8eec4433bac744959822d;hp=4acd69d151a9aa8e7f2376762ff76d8a9af2b0fc;hpb=ea5a7a3403afa5af3948e8226a1ace4f89497210;p=gnulib.git diff --git a/build-aux/gnu-web-doc-update b/build-aux/gnu-web-doc-update index 4acd69d15..268ecc068 100755 --- a/build-aux/gnu-web-doc-update +++ b/build-aux/gnu-web-doc-update @@ -1,15 +1,10 @@ #!/bin/sh # Run this after each non-alpha release, to update the web documentation at # http://www.gnu.org/software/$pkg/manual/ -# This script must be run from the top-level directory, -# assumes you're using git for revision control, -# and requires a .prev-version file as well as a Makefile, -# from which it extracts the version number and package name, respectively. -# Also, it assumes all documentation is in the doc/ sub-directory. -VERSION=2009-07-21.16; # UTC +VERSION=2012-12-16.14; # UTC -# Copyright (C) 2009-2012 Free Software Foundation, Inc. +# Copyright (C) 2009-2013 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -37,8 +32,14 @@ Run this script from top_srcdir (no arguments) after each non-alpha release, to update the web documentation at http://www.gnu.org/software/\$pkg/manual/ +This script assumes you're using git for revision control, and +requires a .prev-version file as well as a Makefile, from which it +extracts the version number and package name, respectively. Also, it +assumes all documentation is in the doc/ sub-directory. + Options: -C, --builddir=DIR location of (configured) Makefile (default: .) + -n, --dry-run don't actually commit anything --help print this help, then exit --version print version number, then exit @@ -100,12 +101,12 @@ find_tool () # Requirements: everything required to bootstrap your package, plus # these. find_tool CVS cvs -find_tool CVSU cvsu find_tool GIT git find_tool RSYNC rsync find_tool XARGS gxargs xargs builddir=. +dryrun= while test $# != 0 do # Handle --option=value by splitting apart and putting back on argv. @@ -121,6 +122,7 @@ do case $1 in --help|--version) ${1#--};; -C|--builddir) shift; builddir=$1; shift ;; + -n|--dry-run) dryrun=echo; shift;; --*) die "unrecognized option: $1";; *) break;; esac @@ -139,7 +141,7 @@ current_branch=$($GIT branch | sed -ne '/^\* /{s///;p;q;}') cleanup() { __st=$? - rm -rf "$tmp" + $dryrun rm -rf "$tmp" $GIT checkout "$current_branch" $GIT submodule update --recursive $GIT branch -d $tmp_branch @@ -172,12 +174,15 @@ $RSYNC -avP "$builddir"/doc/manual/ $tmp/$pkg/manual ( cd $tmp/$pkg/manual - # Add any new files: - $CVSU --types='?' \ - | sed s/..// \ - | $XARGS --no-run-if-empty -- $CVS add -ko + # Add all the files. This is simpler than trying to add only the + # new ones because of new directories: it would require iterating on + # adding the outer directories, and then their contents. + # + # find guarantees that we add outer directories first. + find . -name CVS -prune -o -print \ + | $XARGS --no-run-if-empty -- $dryrun $CVS add -ko - $CVS ci -m $version + $dryrun $CVS ci -m $version ) # Local variables: