57 lines
977 B
Bash
57 lines
977 B
Bash
#! /bin/sh
|
|
|
|
trap 'rm -fr $tmpfiles' 1 2 3 15
|
|
|
|
tmpfiles="mu-test1.in"
|
|
cat <<EOF > mu-test1.in
|
|
msgid "eight"
|
|
msgstr "eighth"
|
|
|
|
msgid "five"
|
|
msgstr "fifth"
|
|
|
|
msgid "four"
|
|
msgstr "fourth"
|
|
|
|
msgid "one"
|
|
msgstr "first"
|
|
|
|
msgid "seven"
|
|
msgstr "seventh"
|
|
|
|
msgid "six"
|
|
msgstr "sixth"
|
|
|
|
msgid "three"
|
|
msgstr "third"
|
|
|
|
msgid "two"
|
|
msgstr "second"
|
|
EOF
|
|
|
|
tmpfiles="$tmpfiles mu-test1.mo"
|
|
: ${MSGFMT=msgfmt}
|
|
${MSGFMT} mu-test1.in -o mu-test1.mo
|
|
|
|
tmpfiles="$tmpfiles mu-test1.out"
|
|
: ${MSGUNFMT=msgunfmt}
|
|
${MSGUNFMT} mu-test1.mo -o mu-test1.out
|
|
|
|
: ${DIFF=diff}
|
|
${DIFF} mu-test1.in mu-test1.out
|
|
result=$?
|
|
|
|
rm -fr $tmpfiles
|
|
|
|
exit $result
|
|
|
|
# Preserve executable bits for this shell script.
|
|
# Thanks to Noah Friedman for this great trick.
|
|
Local Variables:
|
|
eval:(defun frobme () (set-file-modes buffer-file-name file-mode))
|
|
eval:(make-local-variable 'file-mode)
|
|
eval:(setq file-mode (file-modes (buffer-file-name)))
|
|
eval:(make-local-variable 'after-save-hook)
|
|
eval:(add-hook 'after-save-hook 'frobme)
|
|
End:
|