small change

I recommend you clear your backup dir
This commit is contained in:
René Fuhry 2023-05-23 17:14:25 +02:00 committed by GitHub
parent 37f244606d
commit b555ce7644
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

4
update
View File

@ -4,7 +4,7 @@
source "$HOME"/.config/update.conf
VER="2.0.5"
VER="2.0.6"
IGREEN="\033[0;92m" # Intense Green
IYELLOW="\033[0;93m" # Intense Red
NC="\033[0m" # Text Reset
@ -48,7 +48,7 @@ check_for_dblck() {
}
delete_oldest_backup() {
if [[ $1 > $BACKUP_AMOUNT ]]; then
if [[ $1 -ge $BACKUP_AMOUNT ]]; then
OLDEST_FILE="$(ls -t "$BACKUP_LOCATION" | grep $2 | tail -1)"
rm "$BACKUP_LOCATION"/"$OLDEST_FILE"
fi