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

Unverified Commit 1b0fc2c9 authored by James Roberts-Thomson's avatar James Roberts-Thomson Committed by Michael Bestas
Browse files

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
parent a1750b33
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -334,18 +334,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