ths-scripts/pocompare

34 lignes
1.1 KiB
Plaintext
Brut Lien permanent Vue normale Historique

2023-02-25 16:27:22 +00:00
#!/bin/bash -e
2009-02-09 21:47:24 +00:00
#
# 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
#
# ths-pocompare.sh - compare two translation files using diff, unwrapps first
# for best comparison.
2009-02-09 21:47:24 +00:00
if [ $# -ne 2 ]; then
2023-02-25 16:27:22 +00:00
echo "Usage $(basename "$0") <file1> <file2>"
2009-02-09 21:47:24 +00:00
exit 1
fi
file1=$1
file2=$2
2023-02-25 16:27:22 +00:00
msgmerge --no-wrap "$file1" "$file1" -o "${file1}.for.diff"
msgmerge --no-wrap "$file2" "$file2" -o "${file2}.for.diff"
diff "${file1}.for.diff" "${file2}.for.diff"
rm "${file1}.for.diff" "${file2}.for.diff"