-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathconfig.bash
More file actions
executable file
·50 lines (38 loc) · 1.04 KB
/
config.bash
File metadata and controls
executable file
·50 lines (38 loc) · 1.04 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/bash
set -e
trap 'echo "*** Unexpected error ***"' ERR
ORIG_PWD="$(pwd)"
# Move to the build directory
cd "$(dirname "${BASH_SOURCE[0]}")" || exit
source ".bob.bootstrap"
declare -a ARG_TARGET
for arg in "$@"
do
if [[ $arg =~ "=" ]];then
ARG_TARGET+=(\'"${arg}"\')
elif [ "${arg:0:1}" == "/" ];then
ARG_TARGET+=("${arg}")
else
if [ -f "${ORIG_PWD}/${arg}" ];then
ARG_TARGET+=("${ORIG_PWD}/${arg}")
else
ARG_TARGET+=("${SRCDIR}/bldsys/profiles/${arg}")
fi
fi
done
# Move to the working directory
cd -P "${WORKDIR}"
# Allow passed in `update_config`
if command -v bazel-bob-update-config.exe &> /dev/null
then
UPDATE_CONFIG=bazel-bob-update-config.exe
else
UPDATE_CONFIG="${BOB_DIR}/config_system/update_config.py"
fi
# shellcheck disable=SC2294
eval "${UPDATE_CONFIG}" --new -d "${SRCDIR}/Mconfig" \
"${BOB_CONFIG_OPTS}" "${BOB_CONFIG_PLUGIN_OPTS}" \
-j "${CONFIG_JSON}" \
-c "${CONFIG_FILE}" \
--depfile "${CONFIG_FILE}.d" \
"${ARG_TARGET[@]}"