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

Commit 01da9975 authored by Khalid Zubair's avatar Khalid Zubair Committed by Steve Kondik
Browse files

envsetup: cmgerrit: fix for zsh

zsh does not define $FUNCNAME, define it for zsh when necessary.

Change-Id: I097d3e572b18c84d953ca03b3714271d1d2fd5c3
parent 695992ca
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1831,6 +1831,12 @@ function makerecipe() {
}

function cmgerrit() {

    if [ "$(__detect_shell)" == "zsh" ]; then
        # zsh does not define FUNCNAME, derive from funcstack
        local FUNCNAME=$funcstack[1]
    fi

    if [ $# -eq 0 ]; then
        $FUNCNAME help
        return 1