github.com/kastenhq/syft@v0.0.0-20230821225854-0710af25cdbe/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