From 0dae87d3c39796eb0e9288256737e45c5030650e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz=20=28arab=2C=20vx?= =?UTF-8?q?p=29?= Date: Sun, 7 Feb 2016 22:25:58 +0100 Subject: Clear all locale (7) environment variables before each build. --- build.sh | 2 ++ build.subr | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 21cf1f2c..6808e449 100755 --- a/build.sh +++ b/build.sh @@ -5,6 +5,8 @@ unset AR ARFLAGS CC CFLAGS CXX CXXFLAGS LD LDFLAGS; . ./build.vars; . ./build.subr; check_path_vars PREFIX PREFIX_NATIVE WORKDIR; check_prereqs git make openssl sed sort tar tr wget; +set_env_vars "" LANG LANGUAGE LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS \ +LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION LC_ALL; log_msg info "Build started by ${BUILD_USER:=${USER}}@${BUILD_HNAME:=$(hostname)} at ${BUILD_DATE:=$(date %Y-%m-%d-%H-%M-%S)}."; #trap (set -o errexit; mkdir -p ${PREFIX} ${WORKDIR}); diff --git a/build.subr b/build.subr index e8d0a9f7..1c1e7984 100644 --- a/build.subr +++ b/build.subr @@ -146,7 +146,11 @@ set_build_dir() { set_env_vars() { _val=${1}; shift; while [ $# -ge 1 ]; do - export "${1}=${_val}"; shift; + if [ -z "${_val}" ]; then + unset ${1}; + else + export "${1}=${_val}"; + fi; shift; done; unset _val; }; -- cgit v1.2.3