-
Notifications
You must be signed in to change notification settings - Fork 0
/
environment
33 lines (29 loc) · 952 Bytes
/
environment
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
# -*- mode: shell-script -*-
#
# Copyright (c) 2019-2024 Jeremy Green.
SOURCE_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
# java
export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
export PATH="${JAVA_HOME}/bin:${PATH}"
# node
if [ -d "${HOME}/.nodenv/bin" ] ; then
PATH="${HOME}/.nodenv/bin:${PATH}"
fi
if which nodenv > /dev/null 2> /dev/null ; then
eval "$(nodenv init -)"
fi
PATH="${SOURCE_DIR}/src/frontend/node_modules/.bin:${PATH}"
# python
if [ -z "${GITHUB_ACTIONS:-}" ] ; then
if [ -d "${HOME}/.pyenv/bin" ] ; then
PATH="${HOME}/.pyenv/bin:${PATH}"
fi
if which pyenv > /dev/null 2> /dev/null ; then
eval "$(pyenv init -)"
fi
fi
if [ -e "${SOURCE_DIR}/.venv/bin/activate" ] ; then
VIRTUAL_ENV_DISABLE_PROMPT=true source "${SOURCE_DIR}/.venv/bin/activate"
else
printf "%s\n" "venv activate script missing - README.md explains how to set up your python environment." > /dev/stderr
fi