#!/bin/bash

exclude_patterns=(
	'*/gmock/' # embedded GTest and GMock libraries
	'*Android*'
	'*appveyor*'
	'*travis*'
	'*/support' # unused CMake and biicode stuff
	'*/doc/bootstrap' # custom theme
	'*/doc/python-license.txt'
	'*/_static/fonts' # custom fonts
	'*/_static/bootstrap*js' # sourceless JavaScript
)

gunzip -c | tar --wildcards --delete "${exclude_patterns[@]}" | gzip -c --best

