2002-02-26 05:50:45 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
PACKAGE="gimp14-tips"
|
2002-02-27 01:37:22 +08:00
|
|
|
PATH="$PATH:.."
|
2002-02-26 05:50:45 +08:00
|
|
|
|
2002-03-03 20:48:07 +08:00
|
|
|
echo -n "Testing intltool version ... "
|
|
|
|
VER=`intltool-extract --version | grep intltool | sed "s/.* \([0-9.]*\)/\1/"`
|
|
|
|
if expr $VER \>= 0.17 >/dev/null; then
|
|
|
|
echo "looks OK."
|
|
|
|
else
|
|
|
|
echo "too old! (Need 0.17, have $VER)"
|
2002-03-03 21:14:44 +08:00
|
|
|
exit 1
|
2002-03-03 20:48:07 +08:00
|
|
|
fi
|
|
|
|
|
2002-02-26 05:50:45 +08:00
|
|
|
if [ "x$1" = "x--help" ]; then
|
|
|
|
|
|
|
|
echo Usage: ./update.sh langcode
|
|
|
|
echo --help display this help and exit
|
|
|
|
echo
|
|
|
|
echo Examples of use:
|
2002-03-03 20:48:07 +08:00
|
|
|
echo ./update.sh just creates a new pot file from the source
|
|
|
|
echo ./update.sh da created new pot file and updated the da.po file
|
2002-02-26 05:50:45 +08:00
|
|
|
|
|
|
|
elif [ "x$1" = "x" ]; then
|
|
|
|
|
2002-03-03 20:48:07 +08:00
|
|
|
echo "Building the $PACKAGE.pot ..."
|
2002-02-27 01:37:22 +08:00
|
|
|
intltool-update --gettext-package $PACKAGE --pot
|
2002-02-26 05:50:45 +08:00
|
|
|
|
|
|
|
else
|
|
|
|
|
2002-03-03 20:48:07 +08:00
|
|
|
echo "Building the $PACKAGE.pot, merging and updating ..."
|
|
|
|
intltool-update --gettext-package $PACKAGE $1
|
2002-02-26 05:50:45 +08:00
|
|
|
|
2002-03-03 20:48:07 +08:00
|
|
|
fi
|
2002-03-09 03:02:29 +08:00
|
|
|
|
|
|
|
intltool-merge . gimp-tips.xml.in gimp-tips.xml -x -u -c .intltool-merge-cache
|
|
|
|
|
|
|
|
|
|
|
|
xmllint=`which xmllint`
|
|
|
|
if test -n "$xmllint" && test -x "$xmllint"; then
|
|
|
|
echo "Validating gimp-tips.xml."
|
|
|
|
$xmllint --noout --valid gimp-tips.xml \
|
|
|
|
|| ( echo "*************************";
|
|
|
|
echo "* gimp-tips.xml INVALID *";
|
|
|
|
echo "*************************";
|
|
|
|
exit 1; )
|
|
|
|
else
|
|
|
|
echo "Can't find xmllint to validate gimp-tips.xml; proceed with fingers crossed...";
|
|
|
|
fi
|