diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/update_pot | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/scripts/update_pot b/scripts/update_pot index f1d0417e4..c72daac0a 100755 --- a/scripts/update_pot +++ b/scripts/update_pot @@ -43,11 +43,15 @@ for XML in `find $SOURCEDIR -name "*.xml"` ; do echo "Error: error $RC while executing xml2pot" fi - # Revert changes if the only thing changed is the POT-Creation-Date - if diff $PODIR/pot/$POT $PODIR/pot/$POT.new | grep "^[><]" | grep -qv "POT-Creation-Date: " ; then + if [ ! -f $PODIR/pot/$POT ] ; then mv $PODIR/pot/$POT.new $PODIR/pot/$POT else - rm $PODIR/pot/$POT.new + if diff $PODIR/pot/$POT $PODIR/pot/$POT.new | grep "^[><]" | grep -qv "POT-Creation-Date: " ; then + mv $PODIR/pot/$POT.new $PODIR/pot/$POT + else + # Revert changes if the only thing changed is the POT-Creation-Date + rm $PODIR/pot/$POT.new + fi fi done |