summaryrefslogtreecommitdiffstats
path: root/security/nss/lib/zlib/vendor.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
commit36d22d82aa202bb199967e9512281e9a53db42c9 (patch)
tree105e8c98ddea1c1e4784a60a5a6410fa416be2de /security/nss/lib/zlib/vendor.sh
parentInitial commit. (diff)
downloadfirefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz
firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip
Adding upstream version 115.7.0esr.upstream/115.7.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'security/nss/lib/zlib/vendor.sh')
-rw-r--r--security/nss/lib/zlib/vendor.sh58
1 files changed, 58 insertions, 0 deletions
diff --git a/security/nss/lib/zlib/vendor.sh b/security/nss/lib/zlib/vendor.sh
new file mode 100644
index 0000000000..01d75e624a
--- /dev/null
+++ b/security/nss/lib/zlib/vendor.sh
@@ -0,0 +1,58 @@
+#!/usr/bin/env bash
+# Vendor a new version of zlib.
+#
+# Note: This script doesn't remove files if they are removed in the zlib release.
+
+set -e
+
+if [[ $# -lt 1 ]]; then
+ echo "Usage: $0 <version>" 1>&2
+ exit 2
+fi
+
+version="$1"
+ztmp="zlib.$version"
+
+cd "$(dirname "$0")"
+../../fuzz/config/git-copy.sh https://github.com/madler/zlib "v$version" "$ztmp"
+fullversion="$version ("$(cat "$ztmp"/.git-copy)")"
+sed -i -e 's/^Version: .*/Version: '"$fullversion"'/' README.nss
+
+prune=(
+ .git-copy
+ .gitignore
+ CMakeLists.txt
+ ChangeLog
+ FAQ
+ INDEX
+ Makefile
+ Makefile.in
+ amiga
+ configure
+ contrib
+ doc
+ example.c
+ examples
+ make_vms.com
+ minigzip.c
+ msdos
+ nintendods
+ old
+ os400
+ qnx
+ test
+ treebuild.xml
+ watcom
+ win32
+ zconf.h.cmakein
+ zconf.h.in
+ zlib.3
+ zlib.3.pdf
+ zlib.map
+ zlib.pc.cmakein
+ zlib.pc.in
+ zlib2ansi
+)
+for i in "${prune[@]}"; do rm -rf "$ztmp"/"$i"; done
+for i in "$ztmp"/*; do mv "$i" .; done
+rmdir "$ztmp"