2023-01-03 18:55:35 +01:00
|
|
|
if has guix; then
|
2022-01-03 20:14:31 +01:00
|
|
|
GUIX_PROFILE="${PWD}/.guix-root"
|
|
|
|
rm -f "$GUIX_PROFILE"
|
2023-10-10 00:15:27 +02:00
|
|
|
eval "$(guix shell -r "$GUIX_PROFILE" -D -f guix.scm -m manifest.scm --search-paths)"
|
2021-10-31 01:55:25 +02:00
|
|
|
|
|
|
|
# Add development scripts to PATH
|
2023-01-03 18:55:35 +01:00
|
|
|
PATH_add "$(pwd)/scripts"
|
2021-10-31 01:55:25 +02:00
|
|
|
|
|
|
|
venv_dir=".venv"
|
|
|
|
|
|
|
|
if [ ! -e "$venv_dir/bin/python" ] ; then
|
|
|
|
rm -rvf "$venv_dir"
|
|
|
|
pre-commit uninstall
|
|
|
|
fi
|
|
|
|
if [ ! -d "$venv_dir" ] ; then
|
2023-06-10 23:34:12 +02:00
|
|
|
virtualenv -p `which python3` "$venv_dir"
|
2021-10-31 01:55:25 +02:00
|
|
|
poetry install
|
|
|
|
pre-commit install
|
|
|
|
fi
|
|
|
|
|
|
|
|
clear
|
|
|
|
git-cal --author="$(git config user.name)"
|
|
|
|
|
|
|
|
cat << EOF
|
|
|
|
|
|
|
|
The 'scripts' directory has been added to your PATH: you can now invoke scripts without typing the relative path.
|
|
|
|
|
|
|
|
EOF
|
|
|
|
|
|
|
|
fi
|