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
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
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
43 s, \\([^ ]\\), $directory/\\1,g
44 }" < $potfile > ..
/..
/po
/$potfile