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