File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -258,12 +258,17 @@ version=$(echo "${tar_file_basename}" | cut -d- -f2)
258258contents_type_dir=$( echo " ${tar_file_basename} " | cut -d- -f3)
259259tar_first_file=$( tar tf " ${tar_file} " | head -n 1)
260260tar_top_level_dir=$( echo " ${tar_first_file} " | cut -d/ -f1)
261- # Handle longer prefix with project name in dev.eessi.io
261+ # Handle longer prefix with project name in dev.eessi.io and
262+ # get the right basedir from the tarball name
262263if [ " ${cvmfs_repo} " = " dev.eessi.io" ]; then
263- tar_contents_start_level=3
264+ # the project name is the second to last field in the filename (e.g. eessi-2023.06-software-linux-x86_64-amd-zen4-myproject-1744725142.tar.gz)
265+ project_name=$( echo " ${tar_file_basename} " | rev | cut -d- -f2 | rev)
266+ basedir=" ${project_name} " /versions
264267else
265- tar_contents_start_level=2
268+ basedir=versions
266269fi
270+
271+ tar_contents_start_level=2
267272tar_contents_type_dir=$( tar tf " ${tar_file} " | head -n 2 | tail -n 1 | cut -d/ -f${tar_contents_start_level} )
268273
269274# Check if we are running as the CVMFS repo owner, otherwise run cvmfs_server with sudo
You can’t perform that action at this time.
0 commit comments