ac74d8b652
Replace the existing Apache 2.0 boilerplate header with an SPDX tag throughout the zephyr code tree. This patch was generated via a script run over the master branch. Also updated doc/porting/application.rst that had a dependency on line numbers in a literal include. Manually updated subsys/logging/sys_log.c that had a malformed header in the original file. Also cleanup several cases that already had a SPDX tag and we either got a duplicate or missed updating. Jira: ZEP-1457 Change-Id: I6131a1d4ee0e58f5b938300c2d2fc77d2e69572c Signed-off-by: David B. Kinder <david.b.kinder@intel.com> Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
60 lines
1.9 KiB
Bash
60 lines
1.9 KiB
Bash
#
|
|
# Copyright (c) 2015 Wind River Systems, Inc.
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
|
|
# In zsh the value of $0 depends on the FUNCTION_ARGZERO option which is
|
|
# set by default. FUNCTION_ARGZERO, when it is set, sets $0 temporarily
|
|
# to the name of the function/script when executing a shell function or
|
|
# sourcing a script. POSIX_ARGZERO option, when it is set, exposes the
|
|
# original value of $0 in spite of the current FUNCTION_ARGZERO setting.
|
|
#
|
|
# Note: The version of zsh need to be 5.0.6 or above. Any versions below
|
|
# 5.0.6 maybe encoutner errors when sourcing this script.
|
|
if [ -n "$ZSH_VERSION" ]; then
|
|
DIR="${(%):-%N}"
|
|
if [ $options[posixargzero] != "on" ]; then
|
|
setopt posixargzero
|
|
NAME=$(basename -- "$0")
|
|
setopt posixargzero
|
|
else
|
|
NAME=$(basename -- "$0")
|
|
fi
|
|
else
|
|
DIR="${BASH_SOURCE[0]}"
|
|
NAME=$(basename -- "$0")
|
|
fi
|
|
|
|
if [ "X$NAME" "==" "Xzephyr-env.sh" ]; then
|
|
echo "Source this file (do NOT execute it!) to set the Zephyr Kernel environment."
|
|
exit
|
|
fi
|
|
|
|
# You can further customize your environment by creating a bash script called
|
|
# zephyr-env_install.bash in your home directory. It will be automatically
|
|
# run (if it exists) by this script.
|
|
|
|
uname | grep -q MINGW && MINGW_OPT="-W"
|
|
|
|
# identify OS source tree root directory
|
|
export ZEPHYR_BASE=$( builtin cd "$( dirname "$DIR" )" && pwd ${MINGW_OPT})
|
|
|
|
scripts_path=${ZEPHYR_BASE}/scripts
|
|
scripts_path=$(echo "/$scripts_path" | sed 's/\\/\//g' | sed 's/://')
|
|
if ! echo "${PATH}" | grep -q "${scripts_path}"; then
|
|
export PATH=${scripts_path}:${PATH}
|
|
fi
|
|
unset scripts_path
|
|
|
|
# enable custom environment settings
|
|
zephyr_answer_file=~/zephyr-env_install.bash
|
|
[ -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};
|
|
unset zephyr_answer_file
|