From a78643b440c9e9563f884db878f9d37b11b10a1c Mon Sep 17 00:00:00 2001 From: Daniel Hams Date: Thu, 18 Jul 2019 15:00:45 +0100 Subject: [PATCH] Unset a bunch of env vars that might have an unintended influence for a DEV --- sgugdevshell | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/sgugdevshell b/sgugdevshell index 4a434b3..450f806 100755 --- a/sgugdevshell +++ b/sgugdevshell @@ -8,6 +8,39 @@ # these values are just what happens to work on the box # I'm writing this thing on. change to what you have. +# This will be re-used later down the script to best-guess +# at which shell the user actually wants +ORIG_SHELL=$SHELL + +# Unset a bunch of things we don't want to "leak" +# They may get set later down the script, but lets be explicit +# about what needs clearing +# 1) Base tools/paths to them +unset SHELL +unset CONFIG_SHELL +unset SHELL_PATH +unset PERL +unset M4 +unset AWK +unset SED +unset GREP +unset BISON +unset YACC +unset AS +unset LD +unset CC +unset CXX +# 2) Compiler vars +unset CPPFLAGS +unset CFLAGS +unset CXXFLAGS +unset LDFLAGS +# 3) Discovery things +unset LD_LIBRARY_PATH +unset LD_LIBRARYN32_PATH +unset LD_LIBRARYN64_PATH +unset PKG_CONFIG_PATH + BIN_PATH=/opt/local/bin BINUTILS_PATH=/opt/local/binutils-2.21.1/bin GCC_PATH=/opt/local/gcc-8.2.0/bin