From 5131ea8ee648662330a84946b8d4a85828b103a3 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Fri, 20 Nov 2009 23:28:07 +0100 Subject: run autopoint and fetch po files from the bootstrap script * bootstrap: Add autopoint invocation and fetching of .po files. * configure.ac: Bump to GNU gettext 0.17. * ABOUT-NLS: Remove. * m4/gettext.m4: Remove. * m4/iconv.m4: Remove. * m4/lib-link.m4: Remove. * m4/po.m4: Remove. * po/*.po: Remove. --- bootstrap | 89 +++++++++++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 67 insertions(+), 22 deletions(-) (limited to 'bootstrap') diff --git a/bootstrap b/bootstrap index 0b64f33e..6939cdc2 100755 --- a/bootstrap +++ b/bootstrap @@ -1,4 +1,7 @@ #! /bin/sh + +# Bootstrap this package from git. +# # Copyright 1997, 1998, 2005, 2006, 2007, 2008, 2009 Free Software # Foundation, Inc. # @@ -15,26 +18,68 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -# Generate configure.ac with ALL_LINGUAS matching the languages -# we have... -ALL_LINGUAS="" -for i in po/*.po; do - ALL_LINGUAS="$ALL_LINGUAS `basename $i .po`" +package=grep + +# Translation Project rsync URL +TP_URL=translationproject.org::tp/latest + +# Ensure file names are sorted consistently across platforms. +# Also, ensure diagnostics are in English, e.g., "wget --help" below. +LC_ALL=C +export LC_ALL + +# Parse options. + +for option +do + case $option in + --help) + echo "$0: usage: $0 [--skip-po]" + exit;; + --skip-po) + SKIP_PO=t;; + *) + echo >&2 "$0: $option: unknown option" + exit 1;; + esac done -# Eliminate leading whitespace -ALL_LINGUAS="`echo $ALL_LINGUAS |cut -b1-`" -echo "$ALL_LINGUAS" > po/LINGUAS - -# Let auto* do its work -if \ -aclocal -I m4 && -autoheader && -automake -a && -autoconf -then - echo "Next, run ./configure && make && make check" -else - echo - echo "An error occured." - exit 1 -fi + + +# Get translations. + +get_translations() { + echo "$0: getting translations into $1 for $2..." + rsync -Lrtvz "$TP_URL/$2/" "$1" +} + +docmd () { + echo "$0: $* ..." + "$@" && return + exit_status=$? + echo + echo "An error occurred." + exit $exit_status +} + +case $SKIP_PO in +'') get_translations po $package || exit +esac + + +# Generate autoconf and automake snippets. + +docmd autopoint --force + +# Undo modifications to macros by autopoint. + +(cd m4 && git diff . | patch -R -p2) + +# Make sure aclocal.m4 is not older than input files. +sleep 1 + +docmd aclocal --force -I m4 +docmd autoconf --force +docmd autoheader --force +docmd automake --add-missing --copy --force-missing + +echo "Next, run ./configure && make && make check" -- cgit v1.2.1