Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 86e99171 authored by Elliott Hughes's avatar Elliott Hughes
Browse files

envsetup.sh: explain _why_ there's an adb function in here.

This is what I came to do yesterday, but got distracted by the fact that it had been broken.

Change-Id: Ie3baf387c6c95a7302c1f6916c1557d486341cd8
parent 31a9fee8
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -1084,6 +1084,14 @@ function cproj()
    echo "can't find Android.mk"
}

# Ensure that we're always using the adb in the tree. This works around the fact
# that bash caches $PATH lookups, so if you use adb before lunching/building the
# one in your tree, you'll continue to get /usr/bin/adb or whatever even after
# you have the one from your current tree on your path. Historically this would
# cause confusion because glinux had adb in /usr/bin/ by default, though that
# doesn't appear to be the case on my rodete hosts; it is however still the case
# that my Mac has /usr/local/bin/adb installed by default and on the default
# path.
function adb() {
    local ADB=$(which adb)
    if [ -z "$ADB" ]; then