Skip to content

Commit

Permalink
Merge branch 'fix/dev.eessi.io-prefix' of https://github.com/Neves-P/…
Browse files Browse the repository at this point in the history
…filesystem-layer into fix/dev.eessi.io-prefix
  • Loading branch information
Neves-P committed Dec 2, 2024
2 parents d75e9d9 + 85e520f commit f107d8a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/ingest-tarball.sh
Original file line number Diff line number Diff line change
Expand Up @@ -259,10 +259,11 @@ 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
if [ "${cvmfs_repo}" = "dev.eessi.io" ]; then
tar_contents_type_dir=$(tar tf "${tar_file}" | head -n 2 | tail -n 1 | cut -d/ -f3)
tar_contents_start_level=3
else
tar_contents_type_dir=$(tar tf "${tar_file}" | head -n 2 | tail -n 1 | cut -d/ -f2)
tar_contents_start_level=2
fi
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
is_repo_owner || cvmfs_server="sudo cvmfs_server"
Expand Down

0 comments on commit f107d8a

Please sign in to comment.