-
Notifications
You must be signed in to change notification settings - Fork 0
/
.envrc
30 lines (22 loc) · 1.23 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
#!/usr/bin/env bash
# basher installation scheme for dependencies; you can change this if you want,
# so long as all the variables are correct. The .devkit/dk script will clone
# basher to $BASHER_ROOT and look for binaries in $BASHER_INSTALL_BIN.
export BASHER_PREFIX="$PWD/.deps"
export BASHER_INSTALL_BIN="$BASHER_PREFIX/bin"
export BASHER_INSTALL_MAN="$BASHER_PREFIX/man"
# Dependencies are checked out here:
export BASHER_PACKAGES_PATH="$BASHER_PREFIX"
export BASHER_ROOT="$BASHER_PACKAGES_PATH/basherpm/basher"
# Activate virtualenv if present
[[ -f "$BASHER_INSTALL_BIN"/activate && -f "$BASHER_INSTALL_BIN"/python ]] &&
[[ ! "${VIRTUAL_ENV-}" || $VIRTUAL_ENV != "$BASHER_PREFIX" ]] &&
VIRTUAL_ENV_DISABLE_PROMPT=true source "$BASHER_INSTALL_BIN"/activate
__dk_path() { [[ :"${!1}": == *:"$2":* ]] || export $1="$2:${!1}"; }
# Activate .composer/vendor/bin if PHP project
[[ ! -f composer.json ]] || __dk_path PATH "$PWD/vendor/bin"
# $BASHER_INSTALL_BIN must be on PATH to use commands installed as deps
__dk_path PATH "$BASHER_INSTALL_BIN"
# You can add other variables you want available via direnv. Configuration
# variables for devkit itself, however, should go in .dkrc unless they need
# to be available via direnv as well.