Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2808)

Unified Diff: build/android/envsetup.sh

Issue 330513007: Fix sourcing envsetup.sh under zsh. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/envsetup.sh
diff --git a/build/android/envsetup.sh b/build/android/envsetup.sh
index 4e91992ae9c0d190c2b60dcb0bd3a0244f6a9cd2..26960ac75af6429ebe31de79ecfd2fa54f9266cb 100755
--- a/build/android/envsetup.sh
+++ b/build/android/envsetup.sh
@@ -14,7 +14,8 @@ fi
# This only exists to set local variables. Don't call this manually.
android_envsetup_main() {
- local SCRIPT_DIR="$(dirname "${BASH_SOURCE:-$0}")"
+ local SCRIPT_PATH="$1"
+ local SCRIPT_DIR="$(dirname "$SCRIPT_PATH")"
local CURRENT_DIR="$(readlink -f "${SCRIPT_DIR}/../../")"
if [[ -z "${CHROME_SRC}" ]]; then
@@ -48,7 +49,9 @@ android_envsetup_main() {
export ENVSETUP_GYP_CHROME_SRC=${CHROME_SRC} # TODO(thakis): Remove.
}
-android_envsetup_main
+# In zsh, $0 is the name of the file being sourced.
+android_envsetup_main "${BASH_SOURCE:-$0}"
+unset -f android_envsetup_main
android_gyp() {
echo "Please call build/gyp_chromium instead. android_gyp is going away."
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698