summaryrefslogtreecommitdiff
path: root/scripts/update_pot
diff options
context:
space:
mode:
authorFrans Pop <elendil@planet.nl>2006-01-01 12:07:02 +0000
committerFrans Pop <elendil@planet.nl>2006-01-01 12:07:02 +0000
commitbbcf086367b7a3f90c87f32ee414eedd2d5a466e (patch)
tree5774ed31874b1fd98cf8d50cff41f475b13568c5 /scripts/update_pot
parentc5ddaf0e99fcc22147a2f012f9f1c8d7ede93474 (diff)
downloadinstallation-guide-bbcf086367b7a3f90c87f32ee414eedd2d5a466e.zip
Add check to avoid errors
Diffstat (limited to 'scripts/update_pot')
-rwxr-xr-xscripts/update_pot10
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