aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/utils/shell_env.sh
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/utils/shell_env.sh')
-rwxr-xr-xLibrary/Homebrew/utils/shell_env.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/Library/Homebrew/utils/shell_env.sh b/Library/Homebrew/utils/shell_env.sh
new file mode 100755
index 000000000..fc7e1c972
--- /dev/null
+++ b/Library/Homebrew/utils/shell_env.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+set +o posix
+
+IFS="="
+
+while read -r key value
+do
+ export "$key=$value"
+done < /tmp/homebrew-env
+
+# Need to reset IFS to default value for later shell functions like 'printf -v HOMEBREW_MACOS_VERSION_NUMERIC ...' to work
+unset IFS
+
+# HOMEBREW_LIBRARY will have been readded above having been added originally in 'bin/brew'
+source "$HOMEBREW_LIBRARY/Homebrew/brew.sh"