Commit 12e4d0a7 authored by Kenneth Christiansen's avatar Kenneth Christiansen

New update.sh'er

parent 35caae3b
......@@ -6,11 +6,35 @@ if [ "x$1" = "x--help" ]; then
echo Usage: ./update.sh langcode
echo --help display this help and exit
echo --missing search for missing files in POTFILES.in
echo
echo Examples of use:
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
elif [ "x$1" = "x--missing" ]; then
echo "Searching for files containing _( ) but missing in POTFILES.in..."
find ../ -regex '.*\.[c|y|cc|c++|h]' | xargs grep _\( | cut -d: -f1 | uniq | cut -d/ -f2- > POTFILES.in.new
echo Sorting... comparing...
sort -d POTFILES.in -o POTFILES.in
sort -d POTFILES.in.new -o POTFILES.in.missing
diff POTFILES.in POTFILES.in.missing -u0 | grep '^+' |grep -v '^+++'|grep -v '^@@' > POTFILES.in.missing
if [ -s POTFILES.in.missing ]; then
echo && echo "Here are the results:"
echo && cat POTFILES.in.missing
echo && echo "File POTFILES.in.missing is being placed in directory..."
else
echo &&echo "There are no missing files, thanks God!"
rm POTFILES.in.missing
fi
elif [ "x$1" = "x" ]; then
echo "Building the $PACKAGE.pot ..."
......@@ -37,4 +61,6 @@ echo "Now merging $1.po with $PACKAGE.pot, and creating an updated $1.po ..."
mv $1.po $1.po.old && msgmerge $1.po.old $PACKAGE.pot -o $1.po \
&& rm $1.po.old;
msgfmt --statistics $1.po
fi;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment