aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfilip <filip.komar@gmail.com>2015-02-12 23:20:32 +0100
committerfilip <filip.komar@gmail.com>2015-02-12 23:20:32 +0100
commit0210e2fc06864408f4bbb2943c13d6fd5edfe2c9 (patch)
tree5e58df16e7d6e9ca997358f68c68b0ae5e98bbbe
parent1d2c20fe186673a0cbe96e0f0b0a48fa76c64424 (diff)
downloadwww-0210e2fc06864408f4bbb2943c13d6fd5edfe2c9.tar
www-0210e2fc06864408f4bbb2943c13d6fd5edfe2c9.tar.gz
www-0210e2fc06864408f4bbb2943c13d6fd5edfe2c9.tar.bz2
www-0210e2fc06864408f4bbb2943c13d6fd5edfe2c9.tar.xz
www-0210e2fc06864408f4bbb2943c13d6fd5edfe2c9.zip
fix for Copyright line
-rwxr-xr-xtools/rebuild_gettext_catalogs.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/rebuild_gettext_catalogs.sh b/tools/rebuild_gettext_catalogs.sh
index 4e84cac2d..e3b15bfc2 100755
--- a/tools/rebuild_gettext_catalogs.sh
+++ b/tools/rebuild_gettext_catalogs.sh
@@ -29,6 +29,13 @@ do
php tools/extract2gettext.php "$php_source" $resource true
php_error_level=$? # catch php error level
errors[$php_source]=$php_error_level
+ # if there are no real differences restore copy
+ if [ -f "$path_and_filename.pot" ] && [ -f "$path_and_filename.copy" ]; then
+ diff --ignore-matching-lines='^"POT-Creation-Date:' --ignore-matching-lines='^# Copyright (C) 2014 - ' $path_and_filename.pot $path_and_filename.copy
+ if [ $? -eq 0 ]; then
+ cp $path_and_filename.copy $path_and_filename.pot
+ fi
+ fi
if [ -f "$path_and_filename.pot" ]; then
# msgmerge check of generated pot file
msgmerge --quiet --no-wrap $path_and_filename.pot $path_and_filename.pot --output-file=$path_and_filename.tmp
@@ -38,7 +45,7 @@ do
rm $path_and_filename.tmp
fi
if [ -f "$path_and_filename.copy" ] && [ -f "$path_and_filename.tmp" ]; then
- diff --ignore-matching-lines='^"POT-Creation-Date:' $path_and_filename.tmp $path_and_filename.copy
+ diff --ignore-matching-lines='^"POT-Creation-Date:' --ignore-matching-lines='^# Copyright (C) 2014 - ' $path_and_filename.tmp $path_and_filename.copy
if [ $? -eq 1 ]; then # there are differences
errors[$php_source]=0
mv $path_and_filename.tmp $path_and_filename.pot