2 # Usage: xsmallpot.sh srcdir hello-foo [hello-foobar.pot]
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; }
12 potfile=${3-$directory.pot}
14 abs_srcdir=`cd "$srcdir" && pwd`
18 cp -p -r "$abs_srcdir"/../$directory tmp-$directory
19 chmod -R u+w tmp-$directory
23 cat > configure.ac <<EOF
25 AC_CONFIG_AUX_DIR(admin)
26 AM_INIT_AUTOMAKE([$directory], 0)
28 AM_GNU_GETTEXT([external])
29 AM_GNU_GETTEXT_VERSION(0.15)
30 AC_CONFIG_FILES([po/Makefile.in])
31 AC_CONFIG_FILES([Makefile])
32 AC_CONFIG_FILES([m4/Makefile])
45 grep '^\(AC_INIT\|AC_CONFIG\|AC_PROG_\|AC_SUBST(.*OBJC\|AM_INIT\|AM_CONDITIONAL\|AM_GNU_GETTEXT\|AM_PO_SUBDIRS\|AC_OUTPUT\)' configure.ac > tmp-configure.ac
46 mv -f tmp-configure.ac configure.ac
54 s, \\([^ ]\\), $directory/\\1,g
55 }" < $potfile > ../../po/$potfile