Skip to content

Commit b03c328

Browse files
committed
fallback to old method for getting the first file in the tarball
1 parent 80a1d0c commit b03c328

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

scripts/ingest-tarball.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,9 @@ contents_type_dir=$(echo "${tar_file_basename}" | cut -d- -f3)
290290
# e.g. the first file that actually belongs to the software layer for software tarballs
291291
# (and, hence, skip other files, like init scripts)
292292
tar_first_file=$(tar tf "${tar_file}" | grep -m 1 "/${contents_type_dir}/")
293+
if [ -z ${tar_first_file} ]; then
294+
tar_first_file=$(tar tf "${tar_file}" | head -n 1)
295+
fi
293296
tar_top_level_dir=$(echo "${tar_first_file}" | cut -d/ -f1)
294297
# Handle longer prefix with project name in dev.eessi.io and
295298
# get the right basedir from the tarball name

0 commit comments

Comments
 (0)