-
Notifications
You must be signed in to change notification settings - Fork 22
/
env.sh
executable file
·40 lines (26 loc) · 924 Bytes
/
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
34
35
36
37
38
#!/usr/bin/env bash
# get current holba directory path
HOLBA_DIR=$(dirname "${BASH_SOURCE[0]:-${(%):-%x}}")
HOLBA_DIR=$(readlink -f "${HOLBA_DIR}")
#####################################################
# check that this script is sourced
#####################################################
# script needs to run sourced
if [[ "$0" == "$BASH_SOURCE" ]]; then
echo "ERROR: script is not sourced"
exit 1
fi
#####################################################
# source config.env.sh
#####################################################
set --
if [[ ! -f "${HOLBA_DIR}/config.env.sh" ]]; then
echo "ERROR: config.env.sh does not exist, run ./configure.sh first"
return 2
fi
source "${HOLBA_DIR}/config.env.sh"
#####################################################
# source env_derive.sh
#####################################################
set --
source "${HOLBA_DIR}/scripts/setup/env_derive.sh"