Loading envsetup.sh +14 −23 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ function get_abs_build_var() echo "Couldn't locate the top of the tree. Try setting TOP." >&2 return fi (cd $T; CALLED_FROM_SETUP=true BUILD_SYSTEM=build/core \ (\cd $T; CALLED_FROM_SETUP=true BUILD_SYSTEM=build/core \ make --no-print-directory -C "$T" -f build/core/config.mk dumpvar-abs-$1) } Loading Loading @@ -584,16 +584,13 @@ function gettop # 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 # (like pushd) local HERE=$PWD T= while [ \( ! \( -f $TOPFILE \) \) -a \( $PWD != "/" \) ]; do cd .. > /dev/null \cd .. T=`PWD= /bin/pwd` done cd $HERE > /dev/null \cd $HERE if [ -f "$T/$TOPFILE" ]; then echo $T fi Loading @@ -614,21 +611,18 @@ function m() function findmakefile() { TOPFILE=build/core/envsetup.mk # We redirect cd to /dev/null in case it's aliased to # a command that prints something as a side-effect # (like pushd) local HERE=$PWD T= while [ \( ! \( -f $TOPFILE \) \) -a \( $PWD != "/" \) ]; do T=`PWD= /bin/pwd` if [ -f "$T/Android.mk" ]; then echo $T/Android.mk cd $HERE > /dev/null \cd $HERE return fi cd .. > /dev/null \cd .. done cd $HERE > /dev/null \cd $HERE } function mm() Loading Loading @@ -670,7 +664,7 @@ function mmm() fi DIR=`echo $DIR | sed -e 's/:.*//' -e 's:/$::'` if [ -f $DIR/Android.mk ]; then TO_CHOP=`(cd -P -- $T && pwd -P) | wc -c | tr -d ' '` TO_CHOP=`(\cd -P -- $T && pwd -P) | wc -c | tr -d ' '` TO_CHOP=`expr $TO_CHOP + 1` START=`PWD= /bin/pwd` MFILE=`echo $START | cut -c${TO_CHOP}-` Loading Loading @@ -705,7 +699,7 @@ function croot() { T=$(gettop) if [ "$T" ]; then cd $(gettop) \cd $(gettop) else echo "Couldn't locate the top of the tree. Try setting TOP." fi Loading @@ -714,20 +708,17 @@ function croot() function cproj() { TOPFILE=build/core/envsetup.mk # We redirect cd to /dev/null in case it's aliased to # a command that prints something as a side-effect # (like pushd) local HERE=$PWD T= while [ \( ! \( -f $TOPFILE \) \) -a \( $PWD != "/" \) ]; do T=$PWD if [ -f "$T/Android.mk" ]; then cd $T \cd $T return fi cd .. > /dev/null \cd .. done cd $HERE > /dev/null \cd $HERE echo "can't find Android.mk" } Loading Loading @@ -1067,7 +1058,7 @@ function smoketest() return fi (cd "$T" && mmm tests/SmokeTest) && (\cd "$T" && mmm tests/SmokeTest) && adb uninstall com.android.smoketest > /dev/null && adb uninstall com.android.smoketest.tests > /dev/null && adb install $ANDROID_PRODUCT_OUT/data/app/SmokeTestApp.apk && Loading @@ -1094,7 +1085,7 @@ function godir () { T=$(gettop) if [[ ! -f $T/filelist ]]; then echo -n "Creating index..." (cd $T; find . -wholename ./out -prune -o -wholename ./.repo -prune -o -type f > filelist) (\cd $T; find . -wholename ./out -prune -o -wholename ./.repo -prune -o -type f > filelist) echo " Done" echo "" fi Loading Loading @@ -1127,7 +1118,7 @@ function godir () { else pathname=${lines[0]} fi cd $T/$pathname \cd $T/$pathname } # Force JAVA_HOME to point to java 1.6 if it isn't already set Loading Loading
envsetup.sh +14 −23 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ function get_abs_build_var() echo "Couldn't locate the top of the tree. Try setting TOP." >&2 return fi (cd $T; CALLED_FROM_SETUP=true BUILD_SYSTEM=build/core \ (\cd $T; CALLED_FROM_SETUP=true BUILD_SYSTEM=build/core \ make --no-print-directory -C "$T" -f build/core/config.mk dumpvar-abs-$1) } Loading Loading @@ -584,16 +584,13 @@ function gettop # 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 # (like pushd) local HERE=$PWD T= while [ \( ! \( -f $TOPFILE \) \) -a \( $PWD != "/" \) ]; do cd .. > /dev/null \cd .. T=`PWD= /bin/pwd` done cd $HERE > /dev/null \cd $HERE if [ -f "$T/$TOPFILE" ]; then echo $T fi Loading @@ -614,21 +611,18 @@ function m() function findmakefile() { TOPFILE=build/core/envsetup.mk # We redirect cd to /dev/null in case it's aliased to # a command that prints something as a side-effect # (like pushd) local HERE=$PWD T= while [ \( ! \( -f $TOPFILE \) \) -a \( $PWD != "/" \) ]; do T=`PWD= /bin/pwd` if [ -f "$T/Android.mk" ]; then echo $T/Android.mk cd $HERE > /dev/null \cd $HERE return fi cd .. > /dev/null \cd .. done cd $HERE > /dev/null \cd $HERE } function mm() Loading Loading @@ -670,7 +664,7 @@ function mmm() fi DIR=`echo $DIR | sed -e 's/:.*//' -e 's:/$::'` if [ -f $DIR/Android.mk ]; then TO_CHOP=`(cd -P -- $T && pwd -P) | wc -c | tr -d ' '` TO_CHOP=`(\cd -P -- $T && pwd -P) | wc -c | tr -d ' '` TO_CHOP=`expr $TO_CHOP + 1` START=`PWD= /bin/pwd` MFILE=`echo $START | cut -c${TO_CHOP}-` Loading Loading @@ -705,7 +699,7 @@ function croot() { T=$(gettop) if [ "$T" ]; then cd $(gettop) \cd $(gettop) else echo "Couldn't locate the top of the tree. Try setting TOP." fi Loading @@ -714,20 +708,17 @@ function croot() function cproj() { TOPFILE=build/core/envsetup.mk # We redirect cd to /dev/null in case it's aliased to # a command that prints something as a side-effect # (like pushd) local HERE=$PWD T= while [ \( ! \( -f $TOPFILE \) \) -a \( $PWD != "/" \) ]; do T=$PWD if [ -f "$T/Android.mk" ]; then cd $T \cd $T return fi cd .. > /dev/null \cd .. done cd $HERE > /dev/null \cd $HERE echo "can't find Android.mk" } Loading Loading @@ -1067,7 +1058,7 @@ function smoketest() return fi (cd "$T" && mmm tests/SmokeTest) && (\cd "$T" && mmm tests/SmokeTest) && adb uninstall com.android.smoketest > /dev/null && adb uninstall com.android.smoketest.tests > /dev/null && adb install $ANDROID_PRODUCT_OUT/data/app/SmokeTestApp.apk && Loading @@ -1094,7 +1085,7 @@ function godir () { T=$(gettop) if [[ ! -f $T/filelist ]]; then echo -n "Creating index..." (cd $T; find . -wholename ./out -prune -o -wholename ./.repo -prune -o -type f > filelist) (\cd $T; find . -wholename ./out -prune -o -wholename ./.repo -prune -o -type f > filelist) echo " Done" echo "" fi Loading Loading @@ -1127,7 +1118,7 @@ function godir () { else pathname=${lines[0]} fi cd $T/$pathname \cd $T/$pathname } # Force JAVA_HOME to point to java 1.6 if it isn't already set Loading