From 8b6a1a391ab4ac078214e71aae08cc12d5fd8340 Mon Sep 17 00:00:00 2001 From: jmcarcell Date: Tue, 8 Oct 2024 14:11:06 +0200 Subject: [PATCH] Update the setup script for releases for supporting multiple compilers --- scripts/cvmfs/setup-releases.sh | 37 +++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/scripts/cvmfs/setup-releases.sh b/scripts/cvmfs/setup-releases.sh index cbe4209f..296e8363 100644 --- a/scripts/cvmfs/setup-releases.sh +++ b/scripts/cvmfs/setup-releases.sh @@ -40,8 +40,9 @@ function list_releases() { usage return 1 fi - find /cvmfs/sw.hsf.org/key4hep/releases/ -maxdepth 2 -type d -name "*$name*$build_type*" | + find /cvmfs/sw.hsf.org/key4hep/releases/ -maxdepth 2 -type d -name "*$name*$compiler*$build_type*" | \awk -F/ '{print $(NF-1)}' | sort + unset compiler } function list_packages() { @@ -79,29 +80,32 @@ function list_packages() { fi folders+=(/cvmfs/sw.hsf.org/key4hep/releases/$rel/*$name*-*$build_type*) - declare -a package_versions - package_versions=() + declare -A package_versions for folder in "${folders[@]}"; do for package in $(ls $folder); do package_name=$(basename "$package") version_string=$(ls $folder/$package_name -t | head -n 1) package_version=$(echo "$version_string" | awk '{if ($NF ~ /develop/) {split($NF,arr,"_"); printf "%s", arr[1]} else {split($(NF),arr,"-"); printf "%s", arr[1]; for (i=2; i