diff options
author | Shaun McCance <shaunm@gnome.org> | 2016-04-14 15:38:27 -0400 |
---|---|---|
committer | Shaun McCance <shaunm@gnome.org> | 2016-05-06 09:48:50 -0400 |
commit | 5443ba5acfb98b7a6f5455a9986e7575a4d486df (patch) | |
tree | eee84a38b9afb21ffe4fc647e49bc4f433dd04b8 | |
parent | 89b52e2101cbe8c6c85211e005cc14dbbab5803f (diff) | |
download | yelp-xsl-5443ba5acfb98b7a6f5455a9986e7575a4d486df.tar.gz |
Adding simple localbuild.sh script
-rw-r--r-- | configure.ac | 1 | ||||
-rwxr-xr-x | localbuild.sh | 21 |
2 files changed, 22 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 6604e6e3..d06cee75 100644 --- a/configure.ac +++ b/configure.ac @@ -1,3 +1,4 @@ +# Do not split AC_INIT across multiple lines without making localbuild.sh smarter AC_INIT([yelp-xsl],[3.17.90],[http://bugzilla.gnome.org/enter_bug.cgi?product=yelp-xsl]) AC_CONFIG_MACRO_DIR([m4]) diff --git a/localbuild.sh b/localbuild.sh new file mode 100755 index 00000000..f5d2b99a --- /dev/null +++ b/localbuild.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +# This script is for building enough of yelp-xsl to run transforms +# against the local, in-tree build. It's not for installing, disting, +# or doing anything else fancy. Tools like Pintail use local yelp-xsl +# copies, and this script means they don't have to pull in autotools. + +command -v msgfmt >/dev/null 2>&1 || { echo >&2 "msgfmt required to build yelp-xsl"; exit 1; } +command -v itstool >/dev/null 2>&1 || { echo >&2 "itstool required to build yelp-xsl"; exit 1; } + +YELP_XSL_VERSION=$(grep '^AC_INIT(' configure.ac | sed -e 's/^[^,]*,\[//' -e 's/\].*//') + +ALL_LINGUAS=$(grep -v '^#' po/LINGUAS | tr '\n' ' ') + +for lang in $ALL_LINGUAS; do + msgfmt -o "po/$lang.mo" "po/$lang.po" || exit 1 +done +itstool -o xslt/common/domains/yelp-xsl.xml -j xslt/common/domains/yelp-xsl.xml.in \ + $(for lang in $ALL_LINGUAS; do echo "po/$lang.mo"; done) + +exit 0 |