1 #!/bin/sh 2 3 top_builddir="@top_builddir@" 4 localedir="@localedir@" 5 6 destdir="$(pwd)/tmp-root" 7 8 if test -d "${top_builddir}"; then :; else 9 echo "top_builddir \`${top_builddir}' not found" 10 exit 3 11 fi 12 13 echo -n "Test installation of translated messages..." 14 if (cd "${top_builddir}/po" && make DESTDIR="${destdir}" install > /dev/null 2>&1); then 15 echo " done." 16 else 17 echo " FAILED." 18 echo "Could not create test installation of translated messages" 19 exit 2 20 fi 21 22 binlocaledir="$(./print-localedir)" 23 mylocaledir="${destdir}${binlocaledir}" 24 if test -d "${destdir}${binlocaledir}"; then 25 echo "Test installation contains localedir \`${binlocaledir}'." 26 else 27 echo "localedir \`${binlocaledir}' does not exist" 28 exit 1 29 fi 30 31 testnls="./test-nls ${mylocaledir}" 32 if ${testnls}; then 33 echo "NLS test successful" 34 rm -rf "${destdir}" 35 exit 0 36 else 37 echo "NLS test failed, not removing test installation from" 38 echo " ${destdir}" 39 exit 1 40 fi 41