syft/internal/file/test-fixtures/generate-zip-fixture-from-source-dir.sh
Alex Goodman bf1bf057ab
add and update zip util tests with ZipReadCloser coverage
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
2021-06-04 12:11:49 -04:00

8 lines
238 B
Bash
Executable File

#!/usr/bin/env bash
set -eux
# $1 —— absolute path to destination file, should end with .zip, ideally
# $2 —— absolute path to directory from which to add entries to the archive
pushd "$2" && find . -print | zip "$1" -@ && popd