From 494323ed054ebf06bd9dc1e2be44303bc5b1a917 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Fri, 15 Mar 2019 23:31:44 -0400 Subject: _ob_try_load_messages(): Support running in place --- diff --git a/lib/locale.sh b/lib/locale.sh index 1c531df..c5790f6 100644 --- a/lib/locale.sh +++ b/lib/locale.sh @@ -40,8 +40,13 @@ _ob_try_load_messages() shift 1 || _ob_abort local ms= - ms="$(printf "${_OB_LOCALE_PATH}" \ - "${locale}" "${_ob_text_domain}")" + if [ x"${OB_EXE_BUILDDIR:+set}" = 'xset' ]; then # Set and not null + ms="${OB_EXE_BUILDDIR}" + ms="${ms}/locale/${locale}/${_ob_text_domain}.ms" + else + ms="${LOCALEDIR}" + ms="${ms}/${locale}/LC_MESSAGES/${_ob_text_domain}.ms" + fi # POSIX on the dot utility: # "If no readable file is found, a non-interactive shell shall abort" -- cgit v0.9.1