File: cmp_zlib.sh

package info (click to toggle)
varnish 7.7.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,256 kB
  • sloc: ansic: 104,222; python: 2,679; makefile: 1,303; sh: 1,077; awk: 114; perl: 105; ruby: 41
file content (30 lines) | stat: -rw-r--r-- 533 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh

# Compare libvgz with github/madler/zlib

LZ=/tmp/zlib

if [ "${LZ}" = "/tmp/zlib" -a ! -d ${LZ} ] ; then
    rm -rf ${LZ}
    git clone https://github.com/madler/zlib ${LZ}
else
    (cd ${LZ} && git pull)
fi

for i in lib/libvgz/*.[ch]
do
	b=`basename $i`
	if [ "$b" == "vgz.h" ] ; then
		b="zlib.h"
	fi
	if [ -f ${LZ}/$b ] ; then
		echo "#################################### $b"
		sed '
		s/vgz.h/zlib.h/
		# /strm->msg =/s/"/(char *)"/
		' $i |
		diff -wu - ${LZ}/$b
	else
		echo "#### $b #### NOT FOUND ####"
	fi
done