Skip to content
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions scripts/ingest-tarball.sh
Original file line number Diff line number Diff line change
Expand Up @@ -258,12 +258,16 @@ version=$(echo "${tar_file_basename}" | cut -d- -f2)
contents_type_dir=$(echo "${tar_file_basename}" | cut -d- -f3)
tar_first_file=$(tar tf "${tar_file}" | head -n 1)
tar_top_level_dir=$(echo "${tar_first_file}" | cut -d/ -f1)
# Handle longer prefix with project name in dev.eessi.io
# Handle longer prefix with project name in dev.eessi.io and
# get the right basedir from the tarball name
if [ "${cvmfs_repo}" = "dev.eessi.io" ]; then
tar_contents_start_level=3
project_name=$(echo "${tar_file_basename}" | rev | cut -d- -f2 | rev)
Comment thread
Neves-P marked this conversation as resolved.
basedir="${project_name}"/versions
else
tar_contents_start_level=2
basedir=versions
fi

tar_contents_start_level=2
tar_contents_type_dir=$(tar tf "${tar_file}" | head -n 2 | tail -n 1 | cut -d/ -f${tar_contents_start_level})

# Check if we are running as the CVMFS repo owner, otherwise run cvmfs_server with sudo
Expand Down
Loading