Added keep pot template option to script

This commit is contained in:
Marco Ciampa 2015-11-20 11:58:03 +01:00
parent a165fa2037
commit 31b49fe8a6
1 changed files with 12 additions and 4 deletions

View File

@ -11,10 +11,17 @@
#####################################
if [ "$1" = "--help" ] || [ "$1" = "-h" ] ; then
echo "Usage: $0 [locale]"
echo "Usage: $0 [-k] [locale]"
echo
echo "Where -k means keep pot template and not delete it"
exit
fi
if [ "$1" = "-k" ] ; then
KEEP=1
shift
fi
SOURCEDIR=../kicad-source-mirror #Set this first!!!
#Autovars
@ -54,8 +61,9 @@ fi
for i in $LINGUAS
do
msgmerge --force-po $LOCALDIR/$i/kicad.po $LOCALDIR/kicad.pot -o $LOCALDIR/$i/kicad.po 2>&1 # >> /dev/null
# msgfmt --statistics $LOCALDIR/$i/kicad.po 2>&1 >>/dev/null
msgfmt --statistics $LOCALDIR/$i/kicad.po 2>&1 >>/dev/null
done
#Comment this to create new language template
rm $LOCALDIR/kicad.pot
if [ ! "$KEEP" = "1" ]; then
rm $LOCALDIR/kicad.pot
fi