1
0
mirror of https://github.com/elisspace/core.git synced 2026-09-01 17:04:05 +00:00
Files
core/script/run-in-env.sh

19 lines
372 B
Bash
Executable File

#!/bin/sh -eu
# Activate pyenv and virtualenv if present, then run the specified command
# pyenv, pyenv-virtualenv
if [ -s .python-version ]; then
PYENV_VERSION=$(head -n 1 .python-version)
export PYENV_VERSION
fi
# other common virtualenvs
for venv in venv .venv .; do
if [ -f $venv/bin/activate ]; then
. $venv/bin/activate
fi
done
exec "$@"