diff options
author | James Roberts-Thomson <jamesrt@gmail.com> | 2013-04-16 15:53:39 +1200 |
---|---|---|
committer | James Roberts-Thomson <jamesrt@gmail.com> | 2013-04-16 15:53:39 +1200 |
commit | cfaf7daa2d42f92e77bac626e5ae755e759ae3f4 (patch) | |
tree | 4eae9e80017504023441b8222e73ca90fbd6a40f | |
parent | b7a765d2e7c11b89ba18746d45ed972bee834029 (diff) | |
download | build-cfaf7daa2d42f92e77bac626e5ae755e759ae3f4.zip build-cfaf7daa2d42f92e77bac626e5ae755e759ae3f4.tar.gz build-cfaf7daa2d42f92e77bac626e5ae755e759ae3f4.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
-rw-r--r-- | envsetup.sh | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/envsetup.sh b/envsetup.sh index d52d812..2b937f7 100644 --- a/envsetup.sh +++ b/envsetup.sh @@ -256,22 +256,18 @@ function settitle() function addcompletions() { - if [ "${BASH_VERSINFO[0]}" -lt 4 ] ; then - return - fi - - 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 |