github.com/nextlinux/gosbom@v0.81.1-0.20230627115839-1ff50c281391/gosbom/source/test-fixtures/generate-tar-fixture-from-source-dir.sh (about)

     1  #!/usr/bin/env bash
     2  set -eux
     3  
     4  # $1 —— absolute path to destination file, should end with .tar
     5  # $2 —— absolute path to directory from which to add entries to the archive
     6  
     7  pushd "$2"
     8    tar -cvf "$1" .
     9  popd