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

Commit 5771f5d9 authored by Roman Birg's avatar Roman Birg
Browse files

build: better compatibility between zsh shells

Handle equals expansion in zsh

http://www.zsh.org/mla/users/2011/msg00160.html



Change-Id: I2b0cb23991aa88c3fa2c4dce00f7c3a673176e0a
Signed-off-by: default avatarRoman Birg <roman@cyngn.com>
parent 521aa1e2
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -903,7 +903,7 @@ function mmm()
        local DIR TO_CHOP
        local GET_INSTALL_PATH=

        if [ "$(__detect_shell)" == "zsh" ]; then
        if [ "$(__detect_shell)" = "zsh" ]; then
            set -lA DASH_ARGS $(echo "$@" | awk -v RS=" " -v ORS=" " '/^-.*$/')
            set -lA DIRS $(echo "$@" | awk -v RS=" " -v ORS=" " '/^[^-].*$/')
        else
@@ -973,7 +973,7 @@ function mmma()
  local T=$(gettop)
  local DRV=$(getdriver $T)
  if [ "$T" ]; then
    if [ "$(__detect_shell)" == "zsh" ]; then
    if [ "$(__detect_shell)" = "zsh" ]; then
        set -lA DASH_ARGS $(echo "$@" | awk -v RS=" " -v ORS=" " '/^-.*$/')
        set -lA DIRS $(echo "$@" | awk -v RS=" " -v ORS=" " '/^[^-].*$/')
    else
@@ -1833,7 +1833,7 @@ function makerecipe() {

  repo forall -c '

  if [ "$REPO_REMOTE" == "github" ]
  if [ "$REPO_REMOTE" = "github" ]
  then
    pwd
    cmremote
@@ -1844,7 +1844,7 @@ function makerecipe() {

function cmgerrit() {

    if [ "$(__detect_shell)" == "zsh" ]; then
    if [ "$(__detect_shell)" = "zsh" ]; then
        # zsh does not define FUNCNAME, derive from funcstack
        local FUNCNAME=$funcstack[1]
    fi
@@ -2239,7 +2239,7 @@ function dopush()
        echo "Device Found."
    fi

    if (adb shell getprop ro.cm.device | grep -q "$CM_BUILD") || [ "$FORCE_PUSH" == "true" ];
    if (adb shell getprop ro.cm.device | grep -q "$CM_BUILD") || [ "$FORCE_PUSH" = "true" ];
    then
    # retrieve IP and PORT info if we're using a TCP connection
    TCPIPPORT=$(adb devices | egrep '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+:[0-9]+[^0-9]+' \