summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz (arab, vxp) <l.illanes@gmx.de>2016-02-07 22:25:58 +0100
committerLucio Andrés Illanes Albornoz (arab, vxp) <l.illanes@gmx.de>2016-02-07 22:25:58 +0100
commit0dae87d3c39796eb0e9288256737e45c5030650e (patch)
tree180c9366c8f49b555cce84267909dd9ea6110397
parent1d38417dedd13ba85075878cc6faaa217adeb865 (diff)
downloadmidipix_build-0dae87d3c39796eb0e9288256737e45c5030650e.tar.bz2
midipix_build-0dae87d3c39796eb0e9288256737e45c5030650e.tar.xz
Clear all locale (7) environment variables before each build.
-rwxr-xr-xbuild.sh2
-rw-r--r--build.subr6
2 files changed, 7 insertions, 1 deletions
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;
};