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

Unverified Commit e4130531 authored by Matt Mower's avatar Matt Mower Committed by Michael Bestas
Browse files

envsetup: Combine nested else; if into elif in check_product()

Change-Id: I2ea97b892d6e3d0beab2910ae88143b1c213608c
parent 0ac9fb6c
Loading
Loading
Loading
Loading
+5 −7
Original line number Diff line number Diff line
@@ -135,15 +135,13 @@ function check_product()
    if (echo -n $1 | grep -q -e "^lineage_") ; then
        CM_BUILD=$(echo -n $1 | sed -e 's/^lineage_//g')
        export BUILD_NUMBER=$((date +%s%N ; echo $CM_BUILD; hostname) | openssl sha1 | sed -e 's/.*=//g; s/ //g' | cut -c1-10)
    else
    elif (echo -n $1 | grep -q -e "^cm_") ; then
        # Fall back to cm_<product>
        if (echo -n $1 | grep -q -e "^cm_") ; then
        CM_BUILD=$(echo -n $1 | sed -e 's/^cm_//g')
        export BUILD_NUMBER=$((date +%s%N ; echo $CM_BUILD; hostname) | openssl sha1 | sed -e 's/.*=//g; s/ //g' | cut -c1-10)
    else
        CM_BUILD=
    fi
    fi
    export CM_BUILD

        TARGET_PRODUCT=$1 \