X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=tx.sh;h=271f1cc75a82f1dbfbe48cbddd75a1c363fc8547;hp=19568c991e826c196db8714bcf25ed9b9bbcc358;hb=cda90f24b93a7794bc85d8a3f54f82165a857cbb;hpb=a6d4d74c97b8e693d8716cd3ec179edd8b550d50 diff --git a/tx.sh b/tx.sh index 19568c991..271f1cc75 100644 --- a/tx.sh +++ b/tx.sh @@ -54,29 +54,31 @@ if $sync_po; then gnewfile=common.$lang.po if [ -f "$tcurfile" ]; then git show "$mergebase":"$gnewfile" > "$goldfile" - msgmerge -F -U "$tcurfile" common.pot - msgmerge -F -U "$goldfile" common.pot - msgmerge -F -U "$gnewfile" common.pot + msgmerge -N -F -U "$tcurfile" common.pot + msgmerge -N -F -U "$goldfile" common.pot + msgmerge -N -F -U "$gnewfile" common.pot if diff -u "$goldfile" "$gnewfile" >/dev/null; then # no change on git, changed on tx only - msgmerge -F -U "$tcurfile" common.pot + msgmerge -N -F -U "$tcurfile" common.pot cp "$tcurfile" "$gnewfile" else if ! diff -u "$goldfile" "$gnewfile" | patch "$tcurfile"; then - while :; do - vim -o "$tcurfile.rej" "$tcurfile" - echo "OK?" - read -r OK || exit 1 - [ x"$OK" != x"y" ] || break - done - rm -f "$tcurfile.rej" + if [ -z "$BATCH" ]; then + while :; do + vim -o "$tcurfile.rej" "$tcurfile" + echo "OK?" + read -r OK || exit 1 + [ x"$OK" != x"y" ] || break + done + rm -f "$tcurfile.rej" + fi fi - msgmerge -F -U "$tcurfile" common.pot + msgmerge -N -F -U "$tcurfile" common.pot cp "$tcurfile" "$gnewfile" fi rm "$goldfile" else - msgmerge -F -U "$gnewfile" common.pot + msgmerge -N -F -U "$gnewfile" common.pot cp "$gnewfile" "$tcurfile" fi done