diff options
author | james.wei@intel.com <james.wei@intel.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-30 07:44:21 +0000 |
---|---|---|
committer | james.wei@intel.com <james.wei@intel.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-30 07:44:21 +0000 |
commit | f72472505a080a3c2cabd852b9d1d5958e46ed0a (patch) | |
tree | 6a3ddabfb693680876f0882859ade118c160371b /build | |
parent | eb4f693430e6da4b9bdd7b50e90e2fc6a977279d (diff) | |
download | chromium_src-f72472505a080a3c2cabd852b9d1d5958e46ed0a.zip chromium_src-f72472505a080a3c2cabd852b9d1d5958e46ed0a.tar.gz chromium_src-f72472505a080a3c2cabd852b9d1d5958e46ed0a.tar.bz2 |
validate CHROME_SRC setting to avoid confusion
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com/10409048
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139480 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
-rwxr-xr-x | build/android/envsetup.sh | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/build/android/envsetup.sh b/build/android/envsetup.sh index 7ddd064..756c27b 100755 --- a/build/android/envsetup.sh +++ b/build/android/envsetup.sh @@ -93,7 +93,17 @@ export PATH=$PATH:${ANDROID_TOOLCHAIN} if [ -z "${CHROME_SRC}" ]; then # If $CHROME_SRC was not set, assume current directory is CHROME_SRC. - export CHROME_SRC=$(readlink -f .) + export CHROME_SRC="${PWD}" +fi + +if [ "${PWD/"${CHROME_SRC}"/}" == "${PWD}" ]; then + # If current directory is not in $CHROME_SRC, it might be set for other + # source tree. If $CHROME_SRC was set correctly and we are in the correct + # directory, "${PWD/"${CHROME_SRC}"/}" will be "". + # Otherwise, it will equal to "${PWD}" + echo "Warning: Current directory is out of CHROME_SRC, it may not be \ +the one you want." + echo "${CHROME_SRC}" fi if [ ! -d "${CHROME_SRC}" ]; then |