diff options
-rw-r--r-- | src/chroot-tools/Makefile | 4 | ||||
-rw-r--r-- | src/chroot-tools/chcleanup.in | 10 |
2 files changed, 11 insertions, 3 deletions
diff --git a/src/chroot-tools/Makefile b/src/chroot-tools/Makefile index db18ea4..1b77a97 100644 --- a/src/chroot-tools/Makefile +++ b/src/chroot-tools/Makefile @@ -18,8 +18,8 @@ makechrootpkg.sh.in: %.sh.in: $(devtoolsdir)/%.in chcleanup: chcleanup.in chcleanup.lib m4 -P $< | $(edit) > $@ chmod 755 $@ -chcleanup.lib: ../lib/common.sh.top ../lib/common.sh Makefile - { cat $<; bash -c '. ../lib/common.sh; declare -f plain msg msg2 error'; } > $@ +chcleanup.lib: ../lib/common.sh Makefile + bash -c '. ../lib/common.sh; declare -f _l plain msg msg2 error' > $@ distcc-tool.pot: LIBREXGETTEXT_FLAGS+=--simple=errusage diff --git a/src/chroot-tools/chcleanup.in b/src/chroot-tools/chcleanup.in index d76989d..5351878 100644 --- a/src/chroot-tools/chcleanup.in +++ b/src/chroot-tools/chcleanup.in @@ -26,13 +26,21 @@ # leaves you with a cleansystem # # See: HOOKPREBUILD - +set -x set -eE DRYRUN=${DRYRUN:-false} # Statically include various library routines to avoid having # dependencies on outside files. +[[ -n ${TEXTDOMAIN:-} ]] || export TEXTDOMAIN='libretools' +[[ -n ${TEXTDOMAINDIR:-} ]] || export TEXTDOMAINDIR='/usr/share/locale' + +if type gettext &>/dev/null; then + _() { gettext "$@"; } +else + _() { echo "$@"; } +fi # Begin chcleanup.lib ########################################################## m4_include(chcleanup.lib) # End chcleanup.lib ############################################################ |