File: create-conf-files.sh

package info (click to toggle)
percona-toolkit 3.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 68,916 kB
  • sloc: perl: 241,287; sql: 22,868; sh: 19,746; javascript: 6,799; makefile: 353; awk: 38; python: 30; sed: 1
file content (37 lines) | stat: -rwxr-xr-x 793 bytes parent folder | download | duplicates (3)
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