Skip to content

Instantly share code, notes, and snippets.

@masterdesky
Last active March 21, 2021 15:27
Show Gist options
  • Save masterdesky/86ae5f1515bdb5e84d31d1e92e23f575 to your computer and use it in GitHub Desktop.
Save masterdesky/86ae5f1515bdb5e84d31d1e92e23f575 to your computer and use it in GitHub Desktop.
Source enviromental config of Geant4 from Z shell
# Geant4 doesn't support zsh/ksh/etc. non-bash shells to source
# its enviromental configuration script in the "normal" bash-like way.
# Instead we have to change to Geant4's bin diretory and source the
# appropriate `geant4.sh` script from there.
# Suppose we installed Geant4 under the `${GEANT4_INSTALL}` directory
if [ -f ${GEANT4_INSTALL}/bin/geant4.sh ];
then
cd ${GEANT4_INSTALL}/bin
source geant4.sh
cd ~-
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment