Skip to content

Commit

Permalink
Consolidate bash version checks
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jamesrtnz authored and Flinny committed Mar 31, 2015
1 parent b6ed88c commit 45e07ff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions envsetup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -291,18 +291,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/slim/bash_completion"
for dir in $dirs; do
if [ -d ${dir} ]; then
Expand Down

0 comments on commit 45e07ff

Please sign in to comment.