Merge change I485df382 into eclair

* changes:
  Tweak gettop() -- used in defining ANDROID_BUILD_TOP -- to expand symlinks.
This commit is contained in:
Android (Google) Code Review
2009-12-01 12:26:41 -08:00

View File

@@ -537,7 +537,10 @@ function gettop
echo $TOP echo $TOP
else else
if [ -f $TOPFILE ] ; then 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 else
# We redirect cd to /dev/null in case it's aliased to # We redirect cd to /dev/null in case it's aliased to
# a command that prints something as a side-effect # a command that prints something as a side-effect
@@ -546,7 +549,7 @@ function gettop
T= T=
while [ \( ! \( -f $TOPFILE \) \) -a \( $PWD != "/" \) ]; do while [ \( ! \( -f $TOPFILE \) \) -a \( $PWD != "/" \) ]; do
cd .. > /dev/null cd .. > /dev/null
T=$PWD T=`PWD= /bin/pwd`
done done
cd $HERE > /dev/null cd $HERE > /dev/null
if [ -f "$T/$TOPFILE" ]; then if [ -f "$T/$TOPFILE" ]; then