From 551fda7202184e51eae5c74dca138e6d43bde681 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=20Miguel=20Pe=CC=81rez=20Ruiz?= Date: Fri, 19 Jul 2013 01:39:21 +0200 Subject: [PATCH] Don't backup with 'msgmerge' in case LOCALEDIR is a .git repository. --- update | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/update b/update index a6584d7..2b1d934 100755 --- a/update +++ b/update @@ -34,6 +34,7 @@ fi MASTERLOCALEDIR="$LOCALEDIR/$MASTERLOCALE" POTFILES=( $(find "$MASTERLOCALEDIR" -type f -name "*.pot") ) +[ -d "$LOCALEDIR/.git" ] && DOBACKUP="--backup=none" echo "Found ${#POTFILES[@]} master locale files in '$MASTERLOCALEDIR':" echo ${POTFILES[@]//$MASTERLOCALEDIR\/} @@ -64,8 +65,8 @@ do fi echo "Merging $potFile -> $poFile..." - msgmerge -Uv --previous --no-wrap "$poFile" "$potFile" + msgmerge -Uv $DOBACKUP --previous --no-wrap "$poFile" "$potFile" echo done -done \ No newline at end of file +done