mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-09 18:30:16 +00:00
Use sh instead of bash for pt-mysql-summary. Set +u around Bashism check.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/bin/sh
|
||||
|
||||
# This program is part of Percona Toolkit: http://www.percona.com/software/
|
||||
# See "COPYRIGHT, LICENSE, AND WARRANTY" at the end of this file for legal
|
||||
@@ -608,7 +608,7 @@ shorten() {
|
||||
}
|
||||
|
||||
group_concat () {
|
||||
sed -e '{H; $!d;}' -e 'x' -e 's/\n[[:space:]]*\([[:digit:]]*\)[[:space:]]*/, \1x/g' -e 's/[[:space:]][[:space:]]*/ /g' -e 's/, //' "${1}"
|
||||
sed -e 'H; $!d;' -e 'x' -e 's/\n[[:space:]]*\([[:digit:]]*\)[[:space:]]*/, \1x/g' -e 's/[[:space:]][[:space:]]*/ /g' -e 's/, //' "${1}"
|
||||
}
|
||||
|
||||
# ###########################################################################
|
||||
@@ -2308,9 +2308,10 @@ main() {
|
||||
|
||||
# Execute the program if it was not included from another file.
|
||||
# This makes it possible to include without executing, and thus test.
|
||||
set +u
|
||||
if [ "${0##*/}" = "$TOOL" ] \
|
||||
|| [ "${0##*/}" = "bash" -a "$_" = "$0" ]; then
|
||||
|
||||
set -u
|
||||
# Set up temporary dir.
|
||||
mk_tmpdir
|
||||
# Parse command line options.
|
||||
|
@@ -2180,9 +2180,10 @@ sigtrap() { local PTFUNCNAME=sigtrap;
|
||||
|
||||
# Execute the program if it was not included from another file. This makes it
|
||||
# possible to include without executing, and thus test.
|
||||
set +u
|
||||
if [ "${0##*/}" = "$TOOL" ] \
|
||||
|| [ "${0##*/}" = "bash" -a "$_" = "$0" ]; then
|
||||
|
||||
set -u
|
||||
# Set up temporary dir.
|
||||
mk_tmpdir
|
||||
# Parse command line options.
|
||||
|
Reference in New Issue
Block a user