2009-02-09 21:47:24 +00:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
|
|
|
# Copyright 2007, Donatas Glodenis <dgvirtual@akl.lt>
|
|
|
|
#
|
|
|
|
# #
|
|
|
|
# # This script is free software; you can redistribute it and/or modify
|
|
|
|
# # it under the terms of the GNU General Public License 2 as published by
|
|
|
|
# # the Free Software Foundation.
|
|
|
|
#
|
|
|
|
# # This script is distributed in the hope that it will be useful,
|
|
|
|
# # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# # GNU General Public License for more details.
|
|
|
|
# #
|
|
|
|
# # You should have received a copy of the GNU General Public License
|
|
|
|
# # along with this script; if not, write to the Free Software
|
|
|
|
# # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
#
|
2009-02-13 06:06:27 +00:00
|
|
|
# ths-pocompare-kdiff3.sh - compare two translation files using kdiff3,
|
|
|
|
# unwrapps first for best comparison.
|
2009-02-09 21:47:24 +00:00
|
|
|
|
2009-05-09 22:42:22 +01:00
|
|
|
source "`dirname $0`/ths-variables"
|
2009-02-15 19:50:44 +00:00
|
|
|
|
|
|
|
if [ ! $MSGMERGE ]; then
|
|
|
|
echo -e $RED"This program needs the msgmerge utility."$ENDCOLOR
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! $KDIFF3 ]; then
|
|
|
|
echo -e $RED"This program needs the kdiff3 utility."$ENDCOLOR
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2009-02-09 21:47:24 +00:00
|
|
|
if [ $# -ne 2 ]; then
|
|
|
|
echo "Usage `basename $0` <file1> <file2>"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
file1=$1
|
|
|
|
file2=$2
|
|
|
|
|
2009-02-15 19:50:44 +00:00
|
|
|
$MSGMERGE --no-wrap $file1 $file1 -o ${file1}.for.diff
|
|
|
|
$MSGMERGE --no-wrap $file2 $file2 -o ${file2}.for.diff
|
|
|
|
$KDIFF3 ${file1}.for.diff ${file2}.for.diff
|
|
|
|
rm ${file1}.for.diff ${file2}.for.diff
|