File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments