diff options
author | Roman Birg <roman@cyngn.com> | 2016-03-01 10:27:51 -0800 |
---|---|---|
committer | Roman Birg <roman@cyngn.com> | 2016-03-01 10:27:51 -0800 |
commit | 5771f5d99ed66ab1a06ae6edd8561248a1e1f9c5 (patch) | |
tree | 7b0c9f94828a2e566ade7d5ee719206011b34257 /envsetup.sh | |
parent | 521aa1e2e6d1ef35e0051d4cc76f4b2c91577212 (diff) | |
download | build-5771f5d99ed66ab1a06ae6edd8561248a1e1f9c5.zip build-5771f5d99ed66ab1a06ae6edd8561248a1e1f9c5.tar.gz build-5771f5d99ed66ab1a06ae6edd8561248a1e1f9c5.tar.bz2 |
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 <roman@cyngn.com>
Diffstat (limited to 'envsetup.sh')
-rw-r--r-- | envsetup.sh | 10 |
1 files changed, 5 insertions, 5 deletions
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]+' \ |