Skip to content

Commit

Permalink
Handle longer dev.eessi.io prefix in ingestion
Browse files Browse the repository at this point in the history
  • Loading branch information
Neves-P committed Dec 1, 2024
1 parent a5b099d commit 772b3f0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scripts/ingest-tarball.sh
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,12 @@ 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)
tar_contents_type_dir=$(tar tf "${tar_file}" | head -n 2 | tail -n 1 | cut -d/ -f2)
# Handle longer prefix with project name in dev.eessi.io
if [ "${cvmfs_repo}" = "dev.eessi.io" ]; then
tar_contents_type_dir=$(tar tf "${tar_file}" | head -n 2 | tail -n 1 | cut -d/ -f3)
else
tar_contents_type_dir=$(tar tf "${tar_file}" | head -n 2 | tail -n 1 | cut -d/ -f2)
fi

# Check if we are running as the CVMFS repo owner, otherwise run cvmfs_server with sudo
is_repo_owner || cvmfs_server="sudo cvmfs_server"
Expand Down

0 comments on commit 772b3f0

Please sign in to comment.