mirror of
https://github.com/anchore/syft.git
synced 2025-11-17 16:33:21 +01:00
* Refactor zip file tests Signed-off-by: Dan Luhring <dan.luhring@anchore.com> * Add glob support for leading slashes Signed-off-by: Dan Luhring <dan.luhring@anchore.com> * Update zip testing to account for glob matching Signed-off-by: Dan Luhring <dan.luhring@anchore.com> * Ignore .DS_STORE Signed-off-by: Dan Luhring <dan.luhring@anchore.com> * Improve normalization of zip entry names Signed-off-by: Dan Luhring <dan.luhring@anchore.com> * Rename zip test helpers file Signed-off-by: Dan Luhring <dan.luhring@anchore.com>
8 lines
238 B
Bash
Executable File
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
|