msgmerge-properties-1 [plain text]
#! /bin/sh
tmpfiles=""
trap 'rm -fr $tmpfiles' 1 2 3 15
tmpfiles="$tmpfiles mm-p-1.in1 mm-p-1.in2"
cat <<EOF > mm-p-1.in1
not\ existing=but with translation
!not\ existing\ without\ translation=
still\ existing=translation
EOF
cat <<EOF > mm-p-1.in2
still\ existing=here is normally no comment
!untranslated=
EOF
tmpfiles="$tmpfiles mm-p-1.out"
: ${MSGMERGE=msgmerge}
${MSGMERGE} -q --properties-input --properties-output mm-p-1.in1 mm-p-1.in2 -o mm-p-1.out
test $? = 0 || { rm -fr $tmpfiles; exit 1; }
tmpfiles="$tmpfiles mm-p-1.ok"
cat << EOF > mm-p-1.ok
still\ existing=translation
!untranslated=
EOF
: ${DIFF=diff}
${DIFF} mm-p-1.ok mm-p-1.out
result=$?
rm -fr $tmpfiles
exit $result