Rework step options handling

This commit is contained in:
2022-12-12 11:16:26 +01:00
parent 44ae559918
commit 1f431daa16
30 changed files with 120 additions and 120 deletions

View File

@@ -54,7 +54,6 @@ step_8() {
}
step_10_info() {
echoinfoArgs "[OPTIONS]"
echo "Create mysql database without specific characterset"
echoinfo " [OPTIONS]"
echoinfo " --charset,-c <utf8|utf8mb4> : character set and collate"
@@ -64,6 +63,7 @@ step_10_info() {
echoinfo " Manual password entry for non existing user"
echoinfo " --remote, -r : ip of allowed remote host"
}
step_10_options() { echo "[OPTIONS]"; }
step_10_alias() { echo "createdb"; }
step_10() {
local arg
@@ -110,13 +110,13 @@ step_10() {
}
step_11_info() {
echoinfoArgs "[OPTIONS]"
echo "Create mysql user"
echoinfo " [OPTIONS]"
echoinfo " --user, -u : user name"
echoinfo " with manual password entry for non existing user"
echoinfo " --remote, -r : ip of allowed remote host"
}
step_11_options() { echo "[OPTIONS]"; }
step_11_alias() { echo "createuser"; }
step_11() {
local arg
@@ -162,13 +162,13 @@ step_11() {
}
step_12_info() {
echoinfoArgs "[OPTIONS]"
echo "Grant privileges"
echoinfo " [OPTIONS]"
echoinfo " --database, -d : 'database name'.*"
echoinfo " --user, -u : user name"
echoinfo " --remote, -r : ip of allowed remote host"
}
step_12_options() { echo "[OPTIONS]"; }
step_12_alias() { echo "grant"; }
step_12() {
local arg
@@ -200,12 +200,12 @@ step_12() {
}
step_14_info() {
echoinfoArgs "[OPTIONS]"
echo "Revoke all granted privilegs"
echoinfo " [OPTIONS]"
echoinfo " --user, -u : user name"
echoinfo " --remote, -r : ip of allowed remote host"
}
step_14_options() { echo "[OPTIONS]"; }
step_14_alias() { echo "revokeall"; }
step_14() {
local arg
@@ -245,12 +245,12 @@ step_32() {
}
step_34_info() {
echoinfoArgs "[OPTIONS]"
echo "Show privileges"
echoinfo " [OPTIONS]"
echoinfo " --user, -u : user name"
echoinfo " --remote, -r : ip of allowed remote host"
}
step_34_options() { echo "[OPTIONS]"; }
step_34_alias() { echo "listprivileges"; }
step_34() {
local arg
@@ -272,10 +272,8 @@ step_34() {
exe mysql -u root -e 'SHOW GRANTS FOR '"'"$dbUser"'"'@'"'"$dbRemote"'"';'
}
step_36_info() {
echoinfoArgs "[DATABASE_NAME]"
echo "Size of database"
}
step_36_info() { echo "Size of database"; }
step_36_options() { echo "[DATABASE_NAME]"; }
step_36_alias() { echo "sizedb"; }
step_36() {
if [ -z "${2:-}" ]; then
@@ -289,10 +287,8 @@ step_36() {
fi
}
step_50_info() {
echoinfoArgs "<DATABASE NAME> <TARGET DIR>"
echo "Backup (dump) a mysql database"
}
step_50_info() { echo "Backup (dump) a mysql database"; }
step_50_options() { echo "<DATABASE NAME> <TARGET DIR>"; }
step_50_alias() { echo "backup"; }
step_50() {
shift # step number not used