validate CHROME_SRC setting to avoid confusion

BUG=
TEST=


Review URL: https://chromiumcodereview.appspot.com/10409048

git-svn-id: http://src.chromium.org/svn/trunk/src/build@139480 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This commit is contained in:
james.wei@intel.com 2012-05-30 07:44:21 +00:00
Родитель 7396434af9
Коммит 524a46decf
1 изменённых файлов: 11 добавлений и 1 удалений

Просмотреть файл

@ -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