vuls: init at 0.27.0 (#348530)
[NixPkgs.git] / pkgs / build-support / setup-hooks / strip-java-archives.sh
blob22322468f76dd89a52ce9d72b6989223ab249d18
1 # This setup hook makes the fixup phase to repack all java archives in a
2 # deterministic fashion. The most important change being done is the resetting
3 # of the modification times of the archive entries
5 fixupOutputHooks+=('stripJavaArchivesIn $prefix')
7 stripJavaArchivesIn() {
8 local dir="$1"
9 echo "stripping java archives in $dir"
10 find $dir -type f -regextype posix-egrep -regex ".*\.(jar|war|hpi|apk)$" -print0 |
11 while IFS= read -rd '' f; do
12 echo "stripping java archive $f"
13 strip-nondeterminism --type jar "$f"
14 done