diff --git a/mysqlbu-scripts.sh b/mysqlbu-scripts.sh index cec1711..b5da094 100755 --- a/mysqlbu-scripts.sh +++ b/mysqlbu-scripts.sh @@ -64,23 +64,19 @@ DELETE_BACKUP() { sbu1a=(${tbus[$1]}) unset IFS - if [ ${#1} = 1 ]; then - echo -e "Backup selected: ${idsST[Bold]}${idsCL[Red]}`date -d"${sbu1a[4]}" +"%A, %B %d, %Y"`${idsST[Reset]} ${idsCL[Red]}(${bsz})${idsCL[Default]}" - else - echo -e "Backup selected: ${idsST[Bold]}${idsCL[Red]}`date -d"${sbu1a[4]} ${thr//-/:}" +"%A, %B %d, %Y - %I:%M %P"`${idsST[Reset]} ${idsCL[Red]}(${bsz})${idsCL[Default]}" - fi echo "" - if [ ${#1} = 1 ] || [ "${sbu1a[5]: -5}" = "_BASE" ]; then - if [ ${#1} = 1 ]; then - echo -e "${idsCL[Red]}(This will DELETE the entire days worth of backups for the date selected.)"${idsCL[Default]} - else - echo -e "${idsCL[Red]}(This is a daily base backup, and will result in the full day being DELETED.)"${idsCL[Default]} - fi + if [ ${#1} = 1 ] ; then + echo -e "Backup selected: ${idsST[Bold]}${idsCL[Red]}`date -d"${sbu1a[4]}" +"%A, %B %d, %Y"` - (Entire Day) - (${bsz})${idsST[Reset]}" + echo -e "${idsCL[Red]}(This will DELETE the entire days worth of backups for the date selected.)"${idsCL[Default]} + delbu=${sbu1} + elif [ "${sbu1a[5]: -5}" = "_BASE" ]; then + echo -e "Backup selected: ${idsST[Bold]}${idsCL[Red]}`date -d"${sbu1a[4]} ${thr//-/:}" +"%A, %B %d, %Y - %I:%M %P"` (${bsz})${idsST[Reset]}" + echo -e "${idsCL[Red]}(This is a daily base backup, and will result in the full day being DELETED.)"${idsCL[Default]} delbu="/${sbu1a[1]}/${sbu1a[2]}/${sbu1a[3]}/${sbu1a[4]}" else delbu=${sbu1} fi - read -p "Are you sure you wish to DELETE this backup (y/n)?" choice + read -p "Are you sure you wish to DELETE this backup (y/N)?" choice case "$choice" in [Yy]) rm -rf $delbu