-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmysql.sh
More file actions
39 lines (32 loc) · 786 Bytes
/
mysql.sh
File metadata and controls
39 lines (32 loc) · 786 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
if [ -z ${BASH_COMMON_DEFINE+x} ]; then
if [ ! -f ./common.sh ]; then
source <(curl -s https://amusdev.github.io/bash/common.sh)
else
source ./common.sh
fi
fi
# check_env from common.sh
check_env
# common.sh
import_from_local_or_remote modules/mysql.sh
while getopts "v:p:" args;
do
case "${args}" in
v)
MYSQL_VERSION=${OPTARG}
;;
p)
MYSQL_PASSWORD=${OPTARG}
;;
*)
;;
esac
done
if [ -z "$MYSQL_VERSION" ]; then
require_mysql_version_from_cli MYSQL_VERSION
fi
MYSQL_PASSWORD=${MYSQL_PASSWORD:-"P@ssw0rd"}
install_mysql_check_available $MYSQL_VERSION
install_mysql $MYSQL_VERSION $MYSQL_PASSWORD
print_mysql_finish $MYSQL_VERSION $MYSQL_PASSWORD