No empty .Rs/.Re
[netbsd-mini2440.git] / gnu / dist / gettext / gettext-tools / examples / po / xsmallpot.sh
blob7fb1f53950c29a7c6abff9594eb79055052f78a0
1 #!/bin/sh
2 # Usage: xsmallpot.sh srcdir hello-foo [hello-foobar.pot]
4 set -e
6 # Nuisances.
7 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
9 test $# = 2 || test $# = 3 || { echo "Usage: xsmallpot.sh srcdir hello-foo [hello-foobar.pot]" 1>&2; exit 1; }
10 srcdir=$1
11 directory=$2
12 potfile=${3-$directory.pot}
14 abs_srcdir=`cd "$srcdir" && pwd`
16 cd ..
17 rm -rf tmp-$directory
18 cp -p -r "$abs_srcdir"/../$directory tmp-$directory
19 chmod -R u+w tmp-$directory
20 cd tmp-$directory
21 case $directory in
22 hello-c++-kde)
23 ./autogen.sh
24 sed -e 's,tmp-,,' < configure.in > configure.ac
25 grep '^\(AC_INIT\|AC_CONFIG\|AC_PROG_\|AC_SUBST(.*OBJC\|AM_INIT\|AM_CONDITIONAL\|AM_GNU_GETTEXT\|AM_PO_SUBDIRS\|AC_OUTPUT\)' configure.ac > configure.in
26 rm -f configure.ac
27 autoconf
28 ./configure
30 hello-objc-gnustep)
31 ./autogen.sh
34 grep '^\(AC_INIT\|AC_CONFIG\|AC_PROG_\|AC_SUBST(.*OBJC\|AM_INIT\|AM_CONDITIONAL\|AM_GNU_GETTEXT\|AM_PO_SUBDIRS\|AC_OUTPUT\)' configure.ac > configure.in
35 rm -f configure.ac
36 ./autogen.sh
37 ./configure
39 esac
40 cd po
41 make $potfile
42 sed -e "/^#:/ {
43 s, \\([^ ]\\), $directory/\\1,g
44 }" < $potfile > ../../po/$potfile
45 cd ..
46 cd ..
47 rm -rf tmp-$directory