1 1.1 christos #! /bin/sh 2 1.1 christos 3 1.1 christos # Test compendium option. Use it there was no "old" PO file at all 4 1.1 christos # (merely use /dev/null). 5 1.1 christos 6 1.1 christos tmpfiles="" 7 1.1 christos trap 'rm -fr $tmpfiles' 1 2 3 15 8 1.1 christos 9 1.1 christos tmpfiles="$tmpfiles mm-c-4.com mm-c-4.pot" 10 1.1 christos 11 1.1 christos cat <<\EOF > mm-c-4.com 12 1.1 christos msgid "" 13 1.1 christos msgstr "" 14 1.1 christos "Content-Type: text/plain; charset=iso-8859-1\n" 15 1.1 christos "Content-Transfer-Encoding: 8bit\n" 16 1.1 christos 17 1.1 christos #: file.c:345 18 1.1 christos msgid "5" 19 1.1 christos msgstr "fnf" 20 1.1 christos EOF 21 1.1 christos 22 1.1 christos cat <<EOF > mm-c-4.pot 23 1.1 christos #: file.c:123 24 1.1 christos msgid "1" 25 1.1 christos msgstr "" 26 1.1 christos 27 1.1 christos #: file.c:345 28 1.1 christos msgid "5" 29 1.1 christos msgstr "" 30 1.1 christos EOF 31 1.1 christos 32 1.1 christos tmpfiles="$tmpfiles mm-c-4.out" 33 1.1 christos : ${MSGMERGE=msgmerge} 34 1.1 christos ${MSGMERGE} -q --compendium mm-c-4.com -o mm-c-4.out /dev/null mm-c-4.pot 35 1.1 christos test $? = 0 || { rm -fr $tmpfiles; exit 1; } 36 1.1 christos 37 1.1 christos tmpfiles="$tmpfiles mm-c-4.ok" 38 1.1 christos cat << \EOF > mm-c-4.ok 39 1.1 christos msgid "" 40 1.1 christos msgstr "" 41 1.1 christos "Content-Type: text/plain; charset=iso-8859-1\n" 42 1.1 christos "Content-Transfer-Encoding: 8bit\n" 43 1.1 christos 44 1.1 christos #: file.c:123 45 1.1 christos msgid "1" 46 1.1 christos msgstr "" 47 1.1 christos 48 1.1 christos #: file.c:345 49 1.1 christos msgid "5" 50 1.1 christos msgstr "fnf" 51 1.1 christos EOF 52 1.1 christos 53 1.1 christos : ${DIFF=diff} 54 1.1 christos ${DIFF} mm-c-4.ok mm-c-4.out 55 1.1 christos result=$? 56 1.1 christos 57 1.1 christos rm -fr $tmpfiles 58 1.1 christos 59 1.1 christos exit $result 60