zephyr-env.sh: Use lowercase for internal vars

ci: run_ci: Use lowercase for internal variables

This makes it possible to tell at a glance which variables are internal
to the script and which ones are parameters to it, which is very
helpful.

This convention is pretty common. See e.g. Google's shell style guide at
https://google.github.io/styleguide/shell.xml#Naming_Conventions, and
https://github.com/icy/bash-coding-style#naming-and-styles. It's older
than those though.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
This commit is contained in:
Ulf Magnusson 2019-11-22 21:04:20 +01:00 committed by Andrew Boie
parent ed4f3cd354
commit 0194d04c49
1 changed files with 10 additions and 10 deletions

View File

@ -13,20 +13,20 @@
# 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}"
dir="${(%):-%N}"
if [ $options[posixargzero] != "on" ]; then
setopt posixargzero
NAME=$(basename -- "$0")
name=$(basename -- "$0")
unsetopt posixargzero
else
NAME=$(basename -- "$0")
name=$(basename -- "$0")
fi
else
DIR="${BASH_SOURCE[0]}"
NAME=$(basename -- "$0")
dir="${BASH_SOURCE[0]}"
name=$(basename -- "$0")
fi
if [ "X$NAME" "==" "Xzephyr-env.sh" ]; then
if [ "X$name" "==" "Xzephyr-env.sh" ]; then
echo "Source this file (do NOT execute it!) to set the Zephyr Kernel environment."
exit
fi
@ -37,15 +37,15 @@ fi
if uname | grep -q "MINGW"; then
win_build=1
PWD_OPT="-W"
pwd_opt="-W"
else
win_build=0
PWD_OPT=""
pwd_opt=""
fi
# identify OS source tree root directory
export ZEPHYR_BASE=$( builtin cd "$( dirname "$DIR" )" > /dev/null && pwd ${PWD_OPT})
unset PWD_OPT
export ZEPHYR_BASE=$( builtin cd "$( dirname "$dir" )" > /dev/null && pwd ${pwd_opt})
unset pwd_opt
scripts_path=${ZEPHYR_BASE}/scripts
if [ "$win_build" -eq 1 ]; then