github.com/noqcks/syft@v0.0.0-20230920222752-a9e2c4e288e5/internal/file/test-fixtures/generate-zip-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 .zip, ideally 5 # $2 —— absolute path to directory from which to add entries to the archive 6 # $3 —— if files should be zip64 or not 7 8 if [[$3]]; then 9 pushd "$2" && find . -print | zip -fz "$1" -@ && popd 10 else 11 pushd "$2" && find . -print | zip "$1" -@ && popd 12 fi