-
Notifications
You must be signed in to change notification settings - Fork 1
/
.envrc
60 lines (35 loc) · 1.11 KB
/
.envrc
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
51
52
53
54
55
56
57
58
59
60
# .envrc
strict_env
direnv_version '2.32.3'
watch_file './pyproject.toml'
watch_file './rust-toolchain.toml'
watch_file './site_scons/env.py'
eval $(./site_scons/env.py --export)
COLOR_MAGENTA="\033[1;35m"
FORMAT_BOLD="\033[1m"
FORMAT_NONE="\033[0m"
MSG_INFO="${FORMAT_BOLD}${COLOR_MAGENTA}info:${FORMAT_NONE}"
msg_info()
{
printf '%b %s\n' "$MSG_INFO" "$1"
}
use flake
if [ ! -f "$DIRENV_INSTALLED_IDF_TOOLS" ]; then
msg_info 'installing idf-tools since they seem to be missing'
invoke deps.idf.install
fi
if [ ! -f "$DIRENV_INSTALLED_SCONS_ESP_IDF_ENVIRONMENT" ]; then
msg_info 'generating scons esp-idf environment since is seems to be missing'
invoke deps.idf.scons-env-gen
fi
if [ ! -f "$DIRENV_INSTALLED_PYTHON_REQUIREMENTS" ]; then
msg_info 'installing python requirements since they seem to be missing'
invoke deps.python.install-requirements
fi
PATH_add "$CARGO_HOME/bin"
watch_file './tools/cargo-install-gen.py'
if [ ! -f "$DIRENV_INSTALLED_CRATES" ]; then
msg_info 'installing rust crates since they seem to be missing'
invoke deps.cargo.install
fi
pre-commit install --allow-missing-config