1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
#!/bin/bash
#
# Script to generate configuration files for each Percona-Toolkit binary
#
set -e
cd ../../bin
BINLIST="percona-toolkit "
BINLIST+=$(ls -1 pt-*)
#echo ${BINLIST}
OUTPUTDIR=../debian/etc/percona-toolkit
#
# Remove existing
#
rm -frv ../debian/etc/percona-toolkit/pt-*
for f in ${BINLIST}
do
#echo $(pwd)
#echo ${f}
CONFFILE=${OUTPUTDIR}/${f}.conf
echo "Creating config file: ${CONFFILE} ..."
if [ ${f} = "percona-toolkit" ] ; then
echo "#" > ${CONFFILE}
echo "# ${f}.conf: Global configuration file for *ALL TOOLS* in ${f} package" >> ${CONFFILE}
echo "#" >> ${CONFFILE}
echo "noversion-check" >> ${CONFFILE}
else
echo "#" > ${CONFFILE}
echo "# ${f}.conf: Global tool-specific configuration file for ${f}" >> ${CONFFILE}
echo "#" >> ${CONFFILE}
fi
done
|