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