2006-08-04 23:05:41 -05:00
|
|
|
#!/bin/sh
|
2006-08-05 02:08:32 -05:00
|
|
|
|
2008-09-16 10:10:42 -05:00
|
|
|
INTLTOOL_UPDATE_IN=../intltool/intltool/intltool-update.in
|
|
|
|
INTLTOOL_UPDATE=./intltool-update
|
|
|
|
GETTEXT_PACKAGE=moo
|
|
|
|
|
|
|
|
case `pwd` in
|
|
|
|
*/po-gsv)
|
|
|
|
GETTEXT_PACKAGE=moo-gsv
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
do_or_die() {
|
|
|
|
echo "$*"
|
|
|
|
"$@" || exit 1
|
|
|
|
}
|
|
|
|
|
|
|
|
if [ ! -x $INTLTOOL_UPDATE -o $INTLTOOL_UPDATE_IN -nt $INTLTOOL_UPDATE ]; then
|
|
|
|
echo "sed -e 's,@INTLTOOL_PERL@,/usr/bin/env perl,g' $INTLTOOL_UPDATE_IN > $INTLTOOL_UPDATE.tmp"
|
|
|
|
sed -e 's,@INTLTOOL_PERL@,/usr/bin/env perl,g' $INTLTOOL_UPDATE_IN > $INTLTOOL_UPDATE.tmp || exit 1
|
|
|
|
do_or_die mv $INTLTOOL_UPDATE.tmp $INTLTOOL_UPDATE
|
|
|
|
do_or_die chmod +x $INTLTOOL_UPDATE
|
|
|
|
fi
|
|
|
|
|
|
|
|
for f in pot dist; do if [ ! -e $f ]; then ln -s maintain $f; fi; done
|
2007-05-14 20:08:45 -05:00
|
|
|
|
2008-08-30 13:53:46 -05:00
|
|
|
dist () {
|
|
|
|
if [ -n "$1" ]; then
|
2008-09-16 10:10:42 -05:00
|
|
|
echo "$INTLTOOL_UPDATE --gettext-package=$GETTEXT_PACKAGE -d $*"
|
|
|
|
exec $INTLTOOL_UPDATE --gettext-package=$GETTEXT_PACKAGE -d "$@"
|
2008-08-30 13:53:46 -05:00
|
|
|
fi
|
|
|
|
|
|
|
|
for f in *.po; do
|
2008-09-16 10:10:42 -05:00
|
|
|
do_or_die $INTLTOOL_UPDATE --gettext-package=$GETTEXT_PACKAGE -d `basename $f .po`
|
2008-08-30 13:53:46 -05:00
|
|
|
done
|
|
|
|
|
|
|
|
exit 0
|
|
|
|
}
|
|
|
|
|
2006-08-05 02:08:32 -05:00
|
|
|
case `basename $0` in
|
2008-08-30 13:53:46 -05:00
|
|
|
pot)
|
2008-09-16 10:10:42 -05:00
|
|
|
args="--gettext-package=$GETTEXT_PACKAGE -p"
|
2008-08-30 13:53:46 -05:00
|
|
|
;;
|
|
|
|
dist)
|
|
|
|
dist "$@"
|
|
|
|
;;
|
|
|
|
*)
|
2008-09-16 10:10:42 -05:00
|
|
|
args="--gettext-package=$GETTEXT_PACKAGE -m"
|
2008-08-30 13:53:46 -05:00
|
|
|
;;
|
2006-08-05 02:08:32 -05:00
|
|
|
esac
|
|
|
|
|
2008-09-16 10:10:42 -05:00
|
|
|
echo "$INTLTOOL_UPDATE $args $*"
|
|
|
|
exec $INTLTOOL_UPDATE $args "$@"
|