From 62bb60a6b048973f12a16b1eb20ad10b4313ba06 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Mon, 10 Jul 2023 21:57:11 -0500 Subject: [PATCH] Update mm-scripts.sh --- mm-scripts.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/mm-scripts.sh b/mm-scripts.sh index 59ccc85..c3081b8 100755 --- a/mm-scripts.sh +++ b/mm-scripts.sh @@ -1200,20 +1200,21 @@ SERVICERESTORE(){ for bakfile in ${BACKUPDIR}/${fcheck}.*.tgz; do fname=${bakfile##*/} fdate=${fname#*.}; fdate=${fdate%.*} + rdates[${f}]="${fdate}" IFS='-'; read -a f_date <<< "${fdate}"; unset IFS if [ ${f_date[3]} -gt 12 ]; then hr=`expr ${f_date[3]} - 12`; ma=pm; else hr=${f_date[3]}; ma=am; fi; [ ${hr} -lt 10 ] && hr=" ${hr}" fdate="${f_date[1]}/${f_date[2]}/${f_date[0]} @ ${hr}:${f_date[4]}${ma}" [ $f -lt 10 ] && df=" $f" || df=$f - echo -e "[${idsCL[LightCyan]}${df}${idsCL[Default]}]${idsCL[White]} ${fdate} - Incremental Backup - ${fname}${idsCL[Default]}" + echo -e "[${idsCL[LightCyan]}${df}${idsCL[Default]}]${idsCL[White]} ${fdate} - Incremental Backup${idsCL[Default]}" f=$((f+1)) done - - echo - echo -en "${idsCL[LightCyan]}Select a backup to restore: ${idsCL[White]}" + echo -en "\n${idsCL[LightCyan]}Select a backup to restore: ${idsCL[White]}" read restore + echo ${rdates[${restore}]} + fi }