diff options
author | Frans Pop <elendil@planet.nl> | 2006-01-01 12:07:02 +0000 |
---|---|---|
committer | Frans Pop <elendil@planet.nl> | 2006-01-01 12:07:02 +0000 |
commit | bbcf086367b7a3f90c87f32ee414eedd2d5a466e (patch) | |
tree | 5774ed31874b1fd98cf8d50cff41f475b13568c5 | |
parent | c5ddaf0e99fcc22147a2f012f9f1c8d7ede93474 (diff) | |
download | installation-guide-bbcf086367b7a3f90c87f32ee414eedd2d5a466e.zip |
Add check to avoid errors
-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 |