2 # Run this after each non-alpha release, to update the web documentation at
3 # http://www.gnu.org/software/$pkg/manual/
4 # This script must be run from the top-level directory,
5 # assumes you're using git for revision control,
6 # and requires a .prev-version file as well as a Makefile,
7 # from which it extracts the version number and package name, respectively.
8 # Also, it assumes all documentation is in the doc/ sub-directory.
10 VERSION=2009-07-21.16; # UTC
12 # Copyright (C) 2009 Free Software Foundation, Inc.
14 # This program is free software: you can redistribute it and/or modify
15 # it under the terms of the GNU General Public License as published by
16 # the Free Software Foundation, either version 3 of the License, or
17 # (at your option) any later version.
19 # This program is distributed in the hope that it will be useful,
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 # GNU General Public License for more details.
24 # You should have received a copy of the GNU General Public License
25 # along with this program. If not, see <http://www.gnu.org/licenses/>.
27 # Requirements: everything required to bootstrap your package,
28 # plus these: git, cvs, cvsu, rsync, mktemp
31 warn() { printf '%s: %s\n' "$ME" "$*" >&2; }
32 die() { warn "$*"; exit 1; }
40 Run this script (no options or arguments) after each non-alpha release,
41 to update the web documentation at http://www.gnu.org/software/\$pkg/manual/
42 Run it from your project's the top-level directory.
45 --help print this help, then exit
46 --version print version number, then exit
48 Report bugs and patches to <bug-gnulib@gnu.org>.
53 year=`echo "$VERSION" | sed 's/[^0-9].*//'`
56 Copyright (C) $year Free Software Foundation, Inc,
57 License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
58 This is free software: you are free to change and redistribute it.
59 There is NO WARRANTY, to the extent permitted by law.
63 *) die "unrecognized option: $1";;
70 *) die "$ME: too many options" ;;
74 version=$(cat $prev) || die "$ME: no $prev file?"
75 pkg=$(sed -n 's/^PACKAGE = \(.*\)/\1/p' Makefile) || die "$ME: no Makefile?"
76 tmp_branch=web-doc-$version-$$
83 git branch -d $tmp_branch
87 trap 'exit $?' 1 2 13 15
89 # We must build using sources for which --version reports the
90 # just-released version number, not some string like 7.6.18-20761.
91 # That version string propagates into all documentation.
92 git checkout -b $tmp_branch v$version
93 ./bootstrap && ./configure && make && make web-manual
95 tmp=$(mktemp -d --tmpdir=. web-doc-update.XXXXXX) || exit 1
97 && cvs -d $USER@cvs.sv.gnu.org:/webcvs/$pkg co $pkg )
98 rsync -avP doc/manual/ $tmp/$pkg/manual
104 cvsu --types='?'|sed s/..// | xargs --no-run-if-empty -- cvs add -ko
110 # eval: (add-hook 'write-file-hooks 'time-stamp)
111 # time-stamp-start: "VERSION="
112 # time-stamp-format: "%:y-%02m-%02d.%02H"
113 # time-stamp-time-zone: "UTC"
114 # time-stamp-end: "; # UTC"