From fbf8caa0e0f8ddf07974e9252f393c34eb5f2c39 Mon Sep 17 00:00:00 2001 From: charlesschaefer Date: Tue, 22 Jun 2021 06:42:01 -0300 Subject: [PATCH] Added support for zsh in export.sh script (#2340) --- Tools/export.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Tools/export.sh b/Tools/export.sh index a9b9e7facd..81cf497ea8 100755 --- a/Tools/export.sh +++ b/Tools/export.sh @@ -18,7 +18,12 @@ # if [ -z "$SMING_HOME" ]; then - export SMING_HOME=$(readlink -m $BASH_SOURCE/../../Sming) + if [ $(basename $SHELL) = "zsh" ]; then + _SOURCE=${(%):-%N} + else + _SOURCE=$BASH_SOURCE + fi + export SMING_HOME=$(readlink -m $_SOURCE/../../Sming) fi # Common