summaryrefslogtreecommitdiffstats
path: root/envsetup.sh
diff options
context:
space:
mode:
authorJames Roberts-Thomson <jamesrt@gmail.com>2013-04-16 15:53:39 +1200
committerAdnan Begovic <adnan@cyngn.com>2015-10-06 16:36:47 -0700
commit24dd07d3416ed70eb761d512ddbfff6f4fea579d (patch)
tree5fd46d38244de9e89106184c7b6206d1330fed9f /envsetup.sh
parent409f818fccdee9147812b2cb06e703808f55a57a (diff)
downloadbuild-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.sh6
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