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
4
5fixupOutputHooks+=('stripJavaArchivesIn $prefix')
6
7stripJavaArchivesIn() {
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
15}
16