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