2015-05-11 00:16:10 +08:00
|
|
|
|
2015-06-18 02:07:32 +08:00
|
|
|
if [ "X$(basename -- "$0")" == "Xzephyr-env.sh" ]; then
|
2015-06-20 09:21:48 +08:00
|
|
|
echo "Source this file (do NOT execute it!) to set the Zephyr Kernel environment."
|
2015-05-11 00:16:10 +08:00
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
# You can further customize your environment by creating a bash script called
|
2015-06-06 10:42:27 +08:00
|
|
|
# zephyr-env_install.bash in your home directory. It will be automatically
|
2015-05-11 00:16:10 +08:00
|
|
|
# run (if it exists) by this script.
|
|
|
|
|
|
|
|
# identify OS source tree root directory
|
2015-10-28 03:58:47 +08:00
|
|
|
export ZEPHYR_BASE=$( builtin cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
2015-05-11 00:16:10 +08:00
|
|
|
|
2015-06-06 10:46:00 +08:00
|
|
|
scripts_path=${ZEPHYR_BASE}/scripts
|
2015-05-11 00:16:10 +08:00
|
|
|
echo "${PATH}" | grep -q "${scripts_path}"
|
|
|
|
[ $? != 0 ] && export PATH=${scripts_path}:${PATH}
|
|
|
|
unset scripts_path
|
|
|
|
|
|
|
|
# enable custom environment settings
|
2015-06-06 10:42:27 +08:00
|
|
|
zephyr_answer_file=~/zephyr-env_install.bash
|
|
|
|
[ -f ${zephyr_answer_file} ] && . ${zephyr_answer_file}
|
|
|
|
unset zephyr_answer_file
|