mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-01 18:25:59 +00:00
24 lines
545 B
Bash
Executable File
24 lines
545 B
Bash
Executable File
#!/bin/bash
|
|
|
|
if [ ! -d "$HOME/mysql-bin" ]; then
|
|
echo "$HOME/mysql-bin does not exist." >&2
|
|
exit 1
|
|
fi
|
|
|
|
VER=$1
|
|
if [ "$VER" ]; then
|
|
if [ "$VER" != "4.1" -a "$VER" != "5.0" -a "$VER" != "5.1" -a "$VER" != "5.5" -a "$VER" != "5.6" ]; then
|
|
echo "VERSION must be 4.1, 5.0, 5.1, 5.5, or 5.6. Or, do not specify a version to select all available versions." >&2
|
|
exit 1
|
|
fi
|
|
else
|
|
VER='';
|
|
fi
|
|
|
|
select choice in $(ls -d $HOME/mysql-bin/mysql-$VER* | sort -r); do
|
|
echo "export PERCONA_TOOLKIT_SANDBOX=$choice"
|
|
break
|
|
done
|
|
|
|
exit
|