From 1545208c46caea652880e1dca8330f521328b635 Mon Sep 17 00:00:00 2001 From: Ivan Smolin Date: Mon, 9 Aug 2021 11:58:54 +0300 Subject: [PATCH] add install_env script for build phases --- xcode/aux_scripts/install_env.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 xcode/aux_scripts/install_env.sh diff --git a/xcode/aux_scripts/install_env.sh b/xcode/aux_scripts/install_env.sh new file mode 100644 index 0000000..65b8353 --- /dev/null +++ b/xcode/aux_scripts/install_env.sh @@ -0,0 +1,13 @@ +# When you run Git from the command line, it runs in the environment as set up by your Shell. +# GUI OS X apps, however, have no knowledge about your shell - and the PATH environment can be changed in many different places. +# Export our profile with path by ourselves + +function source_home_file { + file="$HOME/$1" + [[ -f "${file}" ]] && source "${file}" +} + +# Use specific exec due to Xcode has custom value of $PATH +if [ -z "$(which pmd)" ]; then + source_home_file ".bash_profile" || source_home_file ".zshrc" || true +fi \ No newline at end of file