diff options
author | Dan Bornstein <danfuzz@android.com> | 2009-11-24 15:48:50 -0800 |
---|---|---|
committer | Dan Bornstein <danfuzz@android.com> | 2009-11-24 15:48:50 -0800 |
commit | d0b274d962ad65dd051bc00f1ae532dcb71679cb (patch) | |
tree | 8b5275b1caa4e0d2bdc743d1bbce1ec4b16a36fe /envsetup.sh | |
parent | 636458dd0665f4cca1a208f054a891a97d3fa8de (diff) | |
download | build-d0b274d962ad65dd051bc00f1ae532dcb71679cb.zip build-d0b274d962ad65dd051bc00f1ae532dcb71679cb.tar.gz build-d0b274d962ad65dd051bc00f1ae532dcb71679cb.tar.bz2 |
Tweak gettop() -- used in defining ANDROID_BUILD_TOP -- to expand symlinks.
This makes runtest, in particular, happier, since it will now find that
its idea of the cwd actually matches with what's claimed in ANDROID_BUILD_TOP.
Change-Id: I485df382d9d314a73b410030bf2116215b6250f9
Diffstat (limited to 'envsetup.sh')
-rw-r--r-- | envsetup.sh | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/envsetup.sh b/envsetup.sh index 6dc2aa9..4eede33 100644 --- a/envsetup.sh +++ b/envsetup.sh @@ -537,7 +537,10 @@ function gettop echo $TOP else if [ -f $TOPFILE ] ; then - echo $PWD + # The following circumlocution (repeated below as well) ensures + # that we record the true directory name and not one that is + # faked up with symlink names. + PWD= /bin/pwd else # We redirect cd to /dev/null in case it's aliased to # a command that prints something as a side-effect @@ -546,7 +549,7 @@ function gettop T= while [ \( ! \( -f $TOPFILE \) \) -a \( $PWD != "/" \) ]; do cd .. > /dev/null - T=$PWD + T=`PWD= /bin/pwd` done cd $HERE > /dev/null if [ -f "$T/$TOPFILE" ]; then |