File xtrabackup-nodoc.sh of Package xtrabackup
#!/bin/bash
#
# Remove documentation files from source archives
#
# Copyright (c) 2012 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.0.4
MYSQL51_VERSION=5.1.59
MYSQL55_VERSION=5.5.17
gunzip -v < percona-xtrabackup-${XTRABACKUP_VERSION}.tar.gz > percona-xtrabackup-${XTRABACKUP_VERSION}.tar && \
tar -v --delete -f percona-xtrabackup-${XTRABACKUP_VERSION}.tar "percona-xtrabackup-${XTRABACKUP_VERSION}/doc" && \
mv -v percona-xtrabackup-${XTRABACKUP_VERSION}.tar percona-xtrabackup-${XTRABACKUP_VERSION}-nodoc.tar && \
gzip -v percona-xtrabackup-${XTRABACKUP_VERSION}-nodoc.tar
gunzip < mysql-${MYSQL51_VERSION}.tar.gz > mysql-${MYSQL51_VERSION}.tar && \
tar -v --delete -f mysql-${MYSQL51_VERSION}.tar "mysql-${MYSQL51_VERSION}/Docs" && \
mv -v mysql-${MYSQL51_VERSION}.tar mysql-${MYSQL51_VERSION}-nodoc.tar && \
gzip -v mysql-${MYSQL51_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