File xtrabackup-nodoc.sh of Package xtrabackup
#!/usr/bin/env bash
#
# Remove documentation files from source archives
#
# Copyright (c) 2013 Andreas Stieger <andreas.stieger@gmx.de>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
#
XTRABACKUP_VERSION=2.1.5
MYSQL55_VERSION=5.5.31
MYSQL56_VERSION=5.6.11
gunzip -v < percona-xtrabackup-${XTRABACKUP_VERSION}.tar.gz > percona-xtrabackup-${XTRABACKUP_VERSION}.tar && \
tar -v --wildcards --delete -f percona-xtrabackup-${XTRABACKUP_VERSION}.tar \
"percona-xtrabackup-${XTRABACKUP_VERSION}/doc" \
"percona-xtrabackup-${XTRABACKUP_VERSION}/mysql-*.tar.gz" \
"percona-xtrabackup-${XTRABACKUP_VERSION}/Percona-Server-*.tar.gz" \
&& \
mv -v percona-xtrabackup-${XTRABACKUP_VERSION}.tar percona-xtrabackup-${XTRABACKUP_VERSION}-nodoc.tar && \
gzip -v percona-xtrabackup-${XTRABACKUP_VERSION}-nodoc.tar
gunzip < mysql-${MYSQL55_VERSION}.tar.gz > mysql-${MYSQL55_VERSION}.tar && \
tar -v --delete -f mysql-${MYSQL55_VERSION}.tar "mysql-${MYSQL55_VERSION}/Docs" && \
mv -v mysql-${MYSQL55_VERSION}.tar mysql-${MYSQL55_VERSION}-nodoc.tar && \
gzip -v mysql-${MYSQL55_VERSION}-nodoc.tar
gunzip < mysql-${MYSQL56_VERSION}.tar.gz > mysql-${MYSQL56_VERSION}.tar && \
tar -v --delete -f mysql-${MYSQL56_VERSION}.tar "mysql-${MYSQL56_VERSION}/Docs" && \
mv -v mysql-${MYSQL56_VERSION}.tar mysql-${MYSQL56_VERSION}-nodoc.tar && \
gzip -v mysql-${MYSQL56_VERSION}-nodoc.tar