if ( -r /afs/cern.ch/sw/lcg/app/releases/ROOT/5.34.26/x86_64-slc6-gcc48-opt/root/bin/thisroot.csh ) then
echo "Loading ROOT 5.34"
cd /afs/cern.ch/sw/lcg/app/releases/ROOT/5.34.26/x86_64-slc6-gcc48-opt/root/; source bin/thisroot.csh
endif
The script loads normaly, however, when I do
root-config --incdir
it returns
/usr/include/root
The problem is that the PATH variable contains a wrong ROOT directory (that was set by the script inside .tcshrc)
Do NOT “unsetenv ROOTSYS” (nor “unset ROOTSYS” in “[b][ak]sh”). The “bin/thisroot.[c]sh” scripts are expected to remove any “old” existing ROOT related entries in all relevant environment variables before adding “new” ones.
Unfortunately the .csh script suffers from a bug when ROOTSYS is defined but empty, which is my case. I agree that in general you do not need to do it.