diff --git a/SOURCES/repack.sh b/SOURCES/repack.sh new file mode 100755 index 0000000..fc126b5 --- /dev/null +++ b/SOURCES/repack.sh @@ -0,0 +1,19 @@ +#! /bin/bash + +set -euxo pipefail + +version=2.0.26 +prerel= + +src=waf-${version}${prerel}.tar.bz2 +dst=${src%.tar.bz2}.stripped.tar.bz2 + +readarray -t files <<-EOF + waf-${version}/docs/sphinx/_images/waf-64x64.png + waf-${version}/docs/slides/presentation/gfx/waflogo.svg +EOF + +# tar's "--delete option has been reported to work properly when tar +# acts as a filter from stdin to stdout." +bzip2 -cd "${src}" | tar --delete "${files[@]}" | bzip2 -c > "${dst}" +touch -m -r "${src}" "${dst}"