summaryrefslogtreecommitdiffstats
path: root/strip-hsieh.sh
blob: eeb3d0f11962cc702e2d20e986cd3f422bbfe02d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash -ex

ver=$1

tdir=`mktemp -d tmpXXXXXX`
pushd $tdir

tar -xzf ../libmemcached-$ver.tar.gz

pushd libmemcached-$ver
 rm libhashkit/hsieh.cc
 grep -r 'azillionmonkeys' . && exit 1
popd

rm -f ../libmemcached-$ver-exhsieh.tar.gz
tar --no-xattrs -czf ../libmemcached-$ver-exhsieh.tar.gz libmemcached-$ver

tar -tzf ../libmemcached-$ver.tar.gz | sort > manifest-before
tar -tzf ../libmemcached-$ver-exhsieh.tar.gz | sort > manifest-after

diff -u manifest-before manifest-after || true

popd
rm -rf $tdir