Re: Source the project environment file from zsh

Nashif, Anas
 

Hi Oleg,




On 20/02/2016, 08:24, "Oleg Hahm" <oliver.hahm(a)inria.fr> wrote:

Dear Zephyr development team,

following the instructions in your Getting Started Guide [1], I tried to run
source zephyr-env.sh
in my zsh 5.2, but get:
zephyr-env.sh:2: = not found

With my limited knowledge about shell the syntax of this script seems indeed
not to be POSIX shell compatible, but rather resemble bash syntax.
I think this can be fixed with:

diff --git a/zephyr-env.sh b/zephyr-env.sh
index dcb0638..d17780a 100644
--- a/zephyr-env.sh
+++ b/zephyr-env.sh
@@ -1,5 +1,5 @@

-if [ "X$(basename -- "$0")" == "Xzephyr-env.sh" ]; then
+if [ "X$(basename -- "$0")" = "Xzephyr-env.sh" ]; then
echo "Source this file (do NOT execute it!) to set the Zephyr Kernel environment."
exit
fi



Can you file a bug in https://jira.zephyrproject.org please? :-)


Anas



Cheers,
Oleg

P.S. Manually copying&pasting the last lines of the script seems to work
though.


[1] https://www.zephyrproject.org/doc/getting_started/installation_linux.html#environment-variables

Join devel@lists.zephyrproject.org to automatically receive all group messages.