Hi, I have ROOT 5 and 6 both installed locally in separate prefixes. Currently I switch between them by using “source” on the specific bin/thisroot.sh file and then just using “root”. It would be nice to be able to call upon either without this step. I can easily make aliases “root5” and “root6” for the specific binary executables, but then all the environment variables are wrong.
I am wondering if there is a better way that does not depend on a script & environment variables. Is there any way that I can have root 5 and 6 available at the same time? What about different versions of ROOT 5?
I guess the obvious workaround for me is to have “root5” and “root6” be more elaborate functions that source the correct thisroot.sh script before running root. Is there any problem with repeatedly running thisroot.sh every time I run root? Definitely a problem with this approach is that it leaves the meaning of bare “root” dependent on which of the previous roots was run. I guess it’s not so much of a problem if I get used to always using root5 or root6 instead of root.
alias root5='source ~/Software/custom_root/compiled/bin/thisroot.sh;root -l'
alias root6='source ~/Software/custom_root/root6/root/bin/thisroot.sh;root -l'
and it seems to work. As far as I can tell, you only need to actually cd to the bin directory to run thisroot.sh if your shell is kind of old and cranky. (according to my reading of thisroot.sh)