github.com/anchore/syft@v1.4.2-0.20240516191711-1bec1fc5d397/syft/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