Improve and cleanup setup.sh script
Several improvements to the setup.sh
script. Some of them are cosmetic but others reduce the number of spawned sub-processes and stat
calls significantly:
- Ensure that
ATLAS_BASE_PROJECT_NAMES
does not contain and leading whitespace during the cmake configuration. That way we don't have to trim it in an awkward way insetup.sh
. - Remove support for lcg_setup.sh
- Factorize setup of base projects into function
- Replace
cut
with shell variable substitution - Move the handling of the trailing
:
into theremove_duplicates
function, which makes the setting of environment variables independent of whether they existed before or not. - Replace deduction of project platform and version from path by cmake variables
I tested this with an Athena-based WorkDir and the environment before/after these changes is exactly the same.
Edited by Frank Winklmeier