From 3ec0157ef11001586de4eb72c0e3e7bbd5ac6732 Mon Sep 17 00:00:00 2001 From: Alan O'Cais Date: Thu, 31 Oct 2024 16:05:53 +0100 Subject: [PATCH] Address review --- .../scripts/only_latest_easystacks.sh | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/workflows/scripts/only_latest_easystacks.sh b/.github/workflows/scripts/only_latest_easystacks.sh index c78829e724..acc9d3279a 100755 --- a/.github/workflows/scripts/only_latest_easystacks.sh +++ b/.github/workflows/scripts/only_latest_easystacks.sh @@ -1,9 +1,21 @@ #!/bin/bash +# +# This script figures out the latest version of EasyBuild being used for the installation of easystack +# files. +# +# This file is part of the EESSI software layer, see +# https://github.com/EESSI/software-layer.git +# +# author: Alan O'Cais (CECAM) +# +# license: GPLv2 +# + EESSI_VERSION=${EESSI_VERSION:-"2023.06"} directory="easystacks/software.eessi.io/${EESSI_VERSION}" # List of example filenames -files=($(ls "$directory"/*.yml)) +files=($(find "$directory" -name "*.yml" | grep -e '-eb-')) [ -n "$DEBUG" ] && echo "${files[@]}" versions=() @@ -39,4 +51,8 @@ for item in "${all_latest_easystacks[@]}"; do done # Output the results -[ -n "$ACCEL_EASYSTACKS" ] && echo "${accel_latest_easystacks[@]}" || echo "${cpu_latest_easystacks[@]}" +if [ -n "$ACCEL_EASYSTACKS" ]; then + echo "${accel_latest_easystacks[@]}" +else + echo "${cpu_latest_easystacks[@]}" +fi