Open marton-munz opened 7 years ago
It is possible to determine which shell is being run, though I think there is not a completely reliable way of doing this. See here for example. Probably using echo $0 is easiest and then branching on the result of that. This can be fooled if somebody runs a script by calling bash script_name because the top level shell may not be BASH but the script is then executed under BASH. There are work-arounds for this, but anyway this is unlikely to be a big problem.
Actually a better solution to this is to simply always run CoverView.py from the BASH shell. This is accomplished by adding the env/bin/coverview bash script. If this script is run it will activate the environment, unset PYTHONPATH and then run CoverView.py. I think this should work on any system where BASH is installed, and is easier than trying to make something that works for all shells.
I think, in order to be run in Fish Shell correctly, the "source env/bin/activate" line in configure.sh should be replaced to "source env/bin/activate.fish"
There is also a activate.csh file in env/bin/ , I guess this can be used for csh shell.
Of course, ideally the installation script would be able to recognise automatically which shell it is being run in, and use the correct activate script depending on the shell