From 5771f5d99ed66ab1a06ae6edd8561248a1e1f9c5 Mon Sep 17 00:00:00 2001 From: Roman Birg Date: Tue, 1 Mar 2016 10:27:51 -0800 Subject: 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: Roman Birg --- envsetup.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'envsetup.sh') diff --git a/envsetup.sh b/envsetup.sh index 3384211..77f7096 100644 --- a/envsetup.sh +++ b/envsetup.sh @@ -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]+' \ -- cgit v1.1