Skip to content

Commit 726e7a9

Browse files
committed
allow version suffix in the tarball
1 parent a87c847 commit 726e7a9

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

scripts/ingest-tarball.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,13 @@ function check_version() {
8080
error "${version} is not a valid EESSI version."
8181
fi
8282

83-
# Check if the version encoded in the filename matches the top-level dir inside the tarball
84-
if [ "${version}" != "${tar_top_level_dir}" ]
83+
# Cut off any suffix from the top-level directory name (which should correspond to the version)
84+
unsuffixed_tar_top_level_dir=$(echo ${tar_top_level_dir} | sed -E 's/-[0-9A-Za-z._-]+//')
85+
86+
# Check if the version encoded in the filename matches the unsuffixed top-level dir inside the tarball
87+
if [ "${version}" != "${unsuffixed_tar_top_level_dir}" ]
8588
then
86-
error "the version in the filename (${version}) does not match the top-level directory in the tarball (${tar_top_level_dir})."
89+
error "the version in the filename (${version}) does not match the (unsuffixed) top-level directory in the tarball (${unsuffixed_tar_top_level_dir})."
8790
fi
8891
}
8992

0 commit comments

Comments
 (0)