-
Notifications
You must be signed in to change notification settings - Fork 0
/
yunetas-env.sh
33 lines (27 loc) · 960 Bytes
/
yunetas-env.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#
# Set Yunetas environment
#
name=$(basename "$0")
if [ "X$name" "==" "Xyunetas-env.sh" ]; then
echo "Source this file (do NOT execute it!) to set the Yunetas Kernel environment."
return 1
fi
if [ ! -f "./YUNETA_VERSION" ]; then
echo "Source this file must be executed inside yunetas directory."
return 1
fi
# You can further customize your environment by creating a bash script called
# .yunetasrc in your home directory. It will be automatically
# run (if it exists) by this script.
# identify OS source tree root directory
export YUNETAS_BASE=$( builtin cd "$( dirname "$dir" )" > /dev/null && pwd ${pwd_opt})
unset pwd_opt
scripts_path=${YUNETAS_BASE}/scripts
if ! echo "${PATH}" | grep -q "${scripts_path}"; then
export PATH=${scripts_path}:${PATH}
fi
unset scripts_path
# enable custom environment settings
yunetas_answer_file=~/.yunetasrc
[ -f ${yunetas_answer_file} ] && . ${yunetas_answer_file}
unset yunetas_answer_file