mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-27 16:12:04 +00:00
Define PREFIX is arg is a dir.
This commit is contained in:
@@ -85,6 +85,7 @@ main() {
|
||||
ARG="${1:-.}"
|
||||
if [ -d "${ARG}" ]; then
|
||||
BASEDIR="$(echo "${ARG}" | sed -e 's!/$!!')"
|
||||
PREFIX=""
|
||||
elif [ -f "${ARG}" -o -f "${ARG}-df" -o -f "${ARG}df" ]; then
|
||||
BASEDIR="$(dirname "${ARG}")"
|
||||
PREFIX="$(echo "${ARG}" | sed -e 's/-[a-z1]*$//' -e 's!^.*/!!')"
|
||||
|
Reference in New Issue
Block a user