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

Unified Diff: build/android/envsetup.sh

Issue 27579004: Make sure envsetup.sh is sourced. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master.pinned
Patch Set: Created 7 years, 2 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 51f225aaaf9dd1272a0791af280a60e74ca47ff6..f8e09c49971f38c2a8afa2a73ef00d02f296af7b 100755
--- a/build/android/envsetup.sh
+++ b/build/android/envsetup.sh
@@ -9,13 +9,12 @@
# ANDROID_SDK_BUILD=1 will then be defined and used in the rest of the setup to
# specifiy build type.
-# TODO(ilevy): Figure out the right check here. This breaks the webkit build as
-# is since it's sourced from another script:
-# http://build.webkit.org/builders/Chromium%20Android%20Release/builds/34681
-#if [ "$_" == "$0" ]; then
-# echo "ERROR: envsetup must be sourced."
-# exit 1
-#fi
+# Make sure we're being sourced (possibly by another script). Check for bash
+# since zsh sets $0 when sourcing.
+if [[ -n "$BASH_VERSION" && "${BASH_SOURCE:-$0}" == "$0" ]]; then
+ echo "ERROR: envsetup must be sourced."
+ exit 1
+fi
# Source functions script. The file is in the same directory as this script.
SCRIPT_DIR="$(dirname "${BASH_SOURCE:-$0}")"
« 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