File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 1+ .DS_Store
Original file line number Diff line number Diff line change @@ -100,9 +100,18 @@ load_default_config() {
100100 CONFIG_encrypt_password=' password0123'
101101}
102102
103+ # OS dependent options (showstoppers on MacOS)
104+ if [[ $OSTYPE == darwin* ]]; then
105+ OS_sed_option=' -E'
106+ OS_du_extra_option=' '
107+ else
108+ OS_sed_option=' -r'
109+ OS_du_extra_option=' --si'
110+ fi
111+
103112mysql_commands () {
104113 VERSION=` mysql -V | grep -oE " [0-9]+\.[0-9]+\.[0-9]+" `
105- NODOT_VER=` echo $VERSION | sed -r ' s/\.//g' `
114+ NODOT_VER=` echo $VERSION | sed $OS_sed_option ' s/\.//g' `
106115 if [ " ${CONFIG_mysql_dump_encrypted_login} " = " yes" ]; then
107116 export MYSQLDUMP=" mysqldump --login-path=$CONFIG_mysql_dump_login_path "
108117 export MYSQLSHOW=" mysqlshow --login-path=$CONFIG_mysql_dump_login_path "
@@ -1994,7 +2003,7 @@ method_backup () {
19942003 # -> finished information
19952004 echo " Total disk space used for backup storage..."
19962005 echo " Size - Location"
1997- echo ` du -hs --si " ${CONFIG_backup_dir} " `
2006+ echo ` du -hs $OS_du_extra_option " ${CONFIG_backup_dir} " `
19982007 echo
19992008 echo " ======================================================================"
20002009 # <- finished information
You can’t perform that action at this time.
0 commit comments