65cee90cc3
environment-setup uses BASH_SOURCE which is bash specific. For other shells, this variable is empty, leading to an error message and empty SDK_PATH. Zsh Uses $0. Unfortunately POSIX is not specifying how exactly $0 should behave when in sourced (or using special dot utility). So other shell support have to be implemented in different manner. Signed-off-by: Krzysztof Kanas <kkanas@fastmail.com> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
26 lines
791 B
Plaintext
26 lines
791 B
Plaintext
cat <<'EOF'
|
|
_ _ _ _ _
|
|
| |__ _ _(_) | __| |_ __ ___ ___ | |_
|
|
| '_ \| | | | | |/ _` | '__/ _ \ / _ \| __|
|
|
| |_) | |_| | | | (_| | | | (_) | (_) | |_
|
|
|_.__/ \__,_|_|_|\__,_|_| \___/ \___/ \__|
|
|
|
|
Making embedded Linux easy!
|
|
|
|
Some tips:
|
|
* PATH now contains the SDK utilities
|
|
* Standard autotools variables (CC, LD, CFLAGS) are exported
|
|
* Kernel compilation variables (ARCH, CROSS_COMPILE, KERNELDIR) are exported
|
|
* To configure do "./configure $CONFIGURE_FLAGS" or use
|
|
the "configure" alias
|
|
* To build CMake-based projects, use the "cmake" alias
|
|
|
|
EOF
|
|
if [ x"$BASH_VERSION" != x"" ] ; then
|
|
SDK_PATH=$(dirname $(realpath "${BASH_SOURCE[0]}"))
|
|
elif [ x"$ZSH_VERSION" != x"" ] ; then
|
|
SDK_PATH=$(dirname $(realpath $0))
|
|
else
|
|
echo "unsupported shell"
|
|
fi
|