diff options
author | James Roberts-Thomson <jamesrt@gmail.com> | 2013-04-16 15:53:39 +1200 |
---|---|---|
committer | Adnan Begovic <adnan@cyngn.com> | 2015-10-06 16:36:47 -0700 |
commit | 24dd07d3416ed70eb761d512ddbfff6f4fea579d (patch) | |
tree | 5fd46d38244de9e89106184c7b6206d1330fed9f /envsetup.sh | |
parent | 409f818fccdee9147812b2cb06e703808f55a57a (diff) | |
download | build-24dd07d3416ed70eb761d512ddbfff6f4fea579d.zip build-24dd07d3416ed70eb761d512ddbfff6f4fea579d.tar.gz build-24dd07d3416ed70eb761d512ddbfff6f4fea579d.tar.bz2 |
Consolidate bash version checks
There were two checks for bash version, the 2nd was superfluous; this
patch removes the duplicate checks, and shifts the bash version check to
being back after the "are we in bash" check.
Change-Id: I57ff8c1fedce80f739c06643d2976d2c1465db1b
Diffstat (limited to 'envsetup.sh')
-rw-r--r-- | envsetup.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/envsetup.sh b/envsetup.sh index cc41c2d..19143de 100644 --- a/envsetup.sh +++ b/envsetup.sh @@ -300,18 +300,18 @@ function settitle() function addcompletions() { - local T dir f - # Keep us from trying to run in something that isn't bash. if [ -z "${BASH_VERSION}" ]; then return fi # Keep us from trying to run in bash that's too old. - if [ ${BASH_VERSINFO[0]} -lt 3 ]; then + if [ "${BASH_VERSINFO[0]}" -lt 4 ] ; then return fi + local T dir f + dirs="sdk/bash_completion vendor/cm/bash_completion" for dir in $dirs; do if [ -d ${dir} ]; then |