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

Unified Diff: build/android/envsetup.sh

Issue 10700141: Canonicalize CHROME_SRC variable on Android (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 5 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 f7ef6211bf6e8a1673cd326af7d7dfb70a0e6919..4a3f9fb9522ce9fcb4096572fca97b4c9e9fe77b 100755
--- a/build/android/envsetup.sh
+++ b/build/android/envsetup.sh
@@ -91,16 +91,17 @@ export PATH=$PATH:${ANDROID_SDK_ROOT}/platform-tools
# Must have tools like arm-linux-androideabi-gcc on the path for ninja
export PATH=$PATH:${ANDROID_TOOLCHAIN}
+CURRENT_DIR="$(readlink -f ${PWD})"
if [ -z "${CHROME_SRC}" ]; then
# If $CHROME_SRC was not set, assume current directory is CHROME_SRC.
- export CHROME_SRC="${PWD}"
+ export CHROME_SRC="${CURRENT_DIR}"
fi
-if [ "${PWD/"${CHROME_SRC}"/}" == "${PWD}" ]; then
+if [ "${CURRENT_DIR/"${CHROME_SRC}"/}" == "${CURRENT_DIR}" ]; 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}"
+ # directory, "${CURRENT_DIR/"${CHROME_SRC}"/}" will be "".
+ # Otherwise, it will equal to "${CURRENT_DIR}"
echo "Warning: Current directory is out of CHROME_SRC, it may not be \
the one you want."
echo "${CHROME_SRC}"
« 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