Last active
July 25, 2023 06:13
-
-
Save mkakh/93973d3ffc13059c8d996e2140ebb9d3 to your computer and use it in GitHub Desktop.
zsh version of source-env.sh for IsoNet-cryoET/IsoNet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
# The original source code is published in IsoNet-cryoET/IsoNet under the MIT license. | |
############### | |
# THIS FILE CAN BE SOURCED INTO YOUR SHELL | |
# TO SET UP ENVIRONMENT WHERE IsoNet CAN BE EXECUTED | |
############### | |
_ISONET_REPO_ROOT="$(dirname "$(realpath "${(%):-%x}")")" | |
isonet_PYTHONPATH="$(dirname "${_ISONET_REPO_ROOT}")" | |
if ! echo "${PYTHONPATH}" | grep -- "${isonet_PYTHONPATH}" >/dev/null; then | |
export PYTHONPATH="${isonet_PYTHONPATH}:${PYTHONPATH}" | |
echo "| ENV: PYTHONPATH='${PYTHONPATH}'" | |
fi | |
isonet_PATH="${_ISONET_REPO_ROOT}/bin" | |
if ! echo "${PATH}" | grep -- "${isonet_PATH}" >/dev/null; then | |
export PATH="${isonet_PATH}:${PATH}" | |
echo "| ENV: PATH='${PATH}'" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment