From 7e704d7ac997387341e920e1757c24cac0efe5e9 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 8 Feb 2016 16:36:45 -0500 Subject: Refactor the build system. Avoid recursive make. This looks like a lot, but more things should "just work". We have `make dist` now! --- src/lib/common.sh.head | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/lib/common.sh.head (limited to 'src/lib/common.sh.head') diff --git a/src/lib/common.sh.head b/src/lib/common.sh.head new file mode 100644 index 0000000..23bfeb8 --- /dev/null +++ b/src/lib/common.sh.head @@ -0,0 +1,25 @@ +#!/hint/bash +# This may be included with or without `set -euE` + +# This file is included by libremessages. +# You should probably use libremessages instead of this. + +# License: Unspecified + +shopt -s extglob + +if [[ -z ${_INCLUDE_COMMON_SH:-} ]]; then +_INCLUDE_COMMON_SH=true + +[[ -n ${TEXTDOMAIN:-} ]] || export TEXTDOMAIN='libretools' +[[ -n ${TEXTDOMAINDIR:-} ]] || export TEXTDOMAINDIR='/usr/share/locale' + +if type gettext &>/dev/null; then + _() { gettext "$@"; } +else + _() { echo "$@"; } +fi + +_l() { + TEXTDOMAIN='librelib' TEXTDOMAINDIR='/usr/share/locale' "$@" +} -- cgit v1.2.3-54-g00ecf