delete-backup avoid extra calls
This commit is contained in:
parent
4841c568fa
commit
571e00a2f4
@ -42,14 +42,17 @@ do
|
|||||||
title
|
title
|
||||||
echo -e "Choose a Restore Point to Delete\nThese may be out of order if they are not HeavyScript backups"
|
echo -e "Choose a Restore Point to Delete\nThese may be out of order if they are not HeavyScript backups"
|
||||||
fi
|
fi
|
||||||
|
while true
|
||||||
|
do
|
||||||
echo "$list_backups"
|
echo "$list_backups"
|
||||||
echo
|
echo
|
||||||
echo "0) Exit"
|
echo "0) Exit"
|
||||||
read -rt 120 -p "Please type a number: " selection
|
read -rt 120 -p "Please type a number: " selection
|
||||||
[[ $selection == 0 ]] && echo "Exiting.." && exit
|
|
||||||
restore_point=$(echo "$list_backups" | grep ^"$selection)" | awk '{print $2}')
|
restore_point=$(echo "$list_backups" | grep ^"$selection)" | awk '{print $2}')
|
||||||
#Check for valid selection. If none, kill script
|
if [[ $selection == 0 ]]; then
|
||||||
if [[ -z "$selection" ]]; then
|
echo "Exiting.."
|
||||||
|
exit
|
||||||
|
elif [[ -z "$selection" ]]; then
|
||||||
echo "Your selection cannot be empty"
|
echo "Your selection cannot be empty"
|
||||||
sleep 3
|
sleep 3
|
||||||
continue
|
continue
|
||||||
@ -58,6 +61,8 @@ do
|
|||||||
sleep 3
|
sleep 3
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
break
|
||||||
|
done
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
clear -x
|
clear -x
|
||||||
|
Loading…
Reference in New Issue
Block a user