From e96eff6ce6a4c6f1f567834d42088c44c27ee2bc Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Sun, 10 May 2015 12:16:10 -0400 Subject: [PATCH] rename environment variables: vxmicro->timo Change-Id: Ic91696ad21084734c568fccbdf52a76b3e9d3479 Signed-off-by: Anas Nashif --- timo-env.sh | 27 +++++++++++++++++++++++++++ vxmicro-env.bash | 31 +++++++++++-------------------- 2 files changed, 38 insertions(+), 20 deletions(-) create mode 100644 timo-env.sh diff --git a/timo-env.sh b/timo-env.sh new file mode 100644 index 0000000000..875f7366e1 --- /dev/null +++ b/timo-env.sh @@ -0,0 +1,27 @@ + +if [ "X$(basename -- "$0")" == "Xtimo-env.bash" ]; then + echo "Source this file (do NOT execute it!) to set the VxMicro environment." + exit +fi + +# You can further customize your environment by creating a bash script called +# timo-env_install.bash in your home directory. It will be automatically +# run (if it exists) by this script. + +# identify OS source tree root directory +export TIMO_BASE=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) + +# prepend VxMicro build system tools to PATH, if not already present +timo_linux_bin=${TIMO_BASE}/host/x86-linux2/bin +scripts_path=${TIMO_BASE}/scripts +echo "${PATH}" | grep -q "${timo_linux_bin}" +[ $? != 0 ] && export PATH=${timo_linux_bin}:${PATH} +unset timo_linux_bin +echo "${PATH}" | grep -q "${scripts_path}" +[ $? != 0 ] && export PATH=${scripts_path}:${PATH} +unset scripts_path + +# enable custom environment settings +timo_answer_file=~/timo-env_install.bash +[ -f ${timo_answer_file} ] && . ${timo_answer_file} +unset timo_answer_file diff --git a/vxmicro-env.bash b/vxmicro-env.bash index 0ba977c4b1..875f7366e1 100644 --- a/vxmicro-env.bash +++ b/vxmicro-env.bash @@ -1,36 +1,27 @@ -if [ "X$(basename -- "$0")" == "Xvxmicro-env.bash" ]; then +if [ "X$(basename -- "$0")" == "Xtimo-env.bash" ]; then echo "Source this file (do NOT execute it!) to set the VxMicro environment." exit fi # You can further customize your environment by creating a bash script called -# vxmicro-env_install.bash in your home directory. It will be automatically +# timo-env_install.bash in your home directory. It will be automatically # run (if it exists) by this script. # identify OS source tree root directory -export VXMICRO_BASE=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) +export TIMO_BASE=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) # prepend VxMicro build system tools to PATH, if not already present -vxmicro_linux_bin=${VXMICRO_BASE}/host/x86-linux2/bin -scripts_path=${VXMICRO_BASE}/scripts -echo "${PATH}" | grep -q "${vxmicro_linux_bin}" -[ $? != 0 ] && export PATH=${vxmicro_linux_bin}:${PATH} -unset vxmicro_linux_bin +timo_linux_bin=${TIMO_BASE}/host/x86-linux2/bin +scripts_path=${TIMO_BASE}/scripts +echo "${PATH}" | grep -q "${timo_linux_bin}" +[ $? != 0 ] && export PATH=${timo_linux_bin}:${PATH} +unset timo_linux_bin echo "${PATH}" | grep -q "${scripts_path}" [ $? != 0 ] && export PATH=${scripts_path}:${PATH} unset scripts_path # enable custom environment settings -vxmicro_answer_file=~/vxmicro-env_install.bash -[ -f ${vxmicro_answer_file} ] && . ${vxmicro_answer_file} -unset vxmicro_answer_file - -# examples of custom settings to place in vxmicro-env_install.bash -# -# 1) create useful aliases -# alias GCC='export VXMICRO_TOOL=gcc' -# alias VIP='export | grep VXMICRO' -# -# 2) specify toolchain location -# declare -x VXMICRO_GCC_DIR="" +timo_answer_file=~/timo-env_install.bash +[ -f ${timo_answer_file} ] && . ${timo_answer_file} +unset timo_answer_file