-
-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy path.envrc
35 lines (28 loc) · 833 Bytes
/
.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
#!/usr/bin/bash
# vim: ft=bash
[[ -z $BASHMATIC_HOME ]] && {
if [[ -s init.sh && -s README.pdf ]]; then
export BASHMATIC_HOME="$(pwd -P)"
else
init_file=$(find . -name init.sh -type f -maxdepth 2)
if [[ -n ${init_file} && -s ${init_file} ]]; then
cd "$(dirname "${init_file}")" || exit 1
else
echo "This is not a proper BASHMATIC_HOME folder." >&2
echo "Please reinstall Bashmatic." >&2
exit 1
fi
fi
}
# shellcheck source=./.bash_safe_source
[[ -f "${BASHMATIC_HOME}/.bash_safe_source" ]] && source "${BASHMATIC_HOME}/.bash_safe_source"
if [[ -n $DEBUG || -n $BASHMATIC_DEBUG ]]; then
source .envrc.debug.on
else
source .envrc.debug.off
fi
PATH_add examples
PATH_add bin
PATH_add .bats-prefix/libexec
PATH_add .bats-prefix/bin
[[ -f .envrc.local ]] && source .envrc.local