Merge lp:~percona-toolkit-dev/percona-toolkit/fix-912902

This commit is contained in:
Daniel Nichter
2012-06-11 15:06:46 -04:00
2 changed files with 8 additions and 2 deletions

View File

@@ -4,6 +4,8 @@
# See "COPYRIGHT, LICENSE, AND WARRANTY" at the end of this file for legal
# notices and disclaimers.
TOOL="pt-pmp"
# ###########################################################################
# tmpdir package
# This package is a copy without comments from the original. The original
@@ -212,7 +214,8 @@ main() {
# Execute the program if it was not included from another file. This makes it
# possible to include without executing, and thus test.
if [ "$(basename "$0")" = "pt-pmp" ] || [ "$(basename "$0")" = "bash" -a "$_" = "$0" ]; then
if [ "${0##*/}" = "$TOOL" ] \
|| [ "${0##*/}" = "bash" -a "$_" = "$0" ]; then
mk_tmpdir
main "$@"
rm_tmpdir

View File

@@ -1,5 +1,7 @@
#!/usr/bin/env bash
TOOL="pt-sift"
# 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
# notices and disclaimers.
@@ -536,7 +538,8 @@ main() {
# Execute the program if it was not included from another file. This makes it
# possible to include without executing, and thus test.
if [ "$(basename "$0")" = "pt-sift" ] || [ "$(basename "$0")" = "bash" -a "$_" = "$0" ]; then
if [ "${0##*/}" = "$TOOL" ] \
|| [ "${0##*/}" = "bash" -a "$_" = "$0" ]; then
main "$@"
fi