small change
I recommend you clear your backup dir
This commit is contained in:
parent
37f244606d
commit
b555ce7644
4
update
4
update
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
source "$HOME"/.config/update.conf
|
source "$HOME"/.config/update.conf
|
||||||
|
|
||||||
VER="2.0.5"
|
VER="2.0.6"
|
||||||
IGREEN="\033[0;92m" # Intense Green
|
IGREEN="\033[0;92m" # Intense Green
|
||||||
IYELLOW="\033[0;93m" # Intense Red
|
IYELLOW="\033[0;93m" # Intense Red
|
||||||
NC="\033[0m" # Text Reset
|
NC="\033[0m" # Text Reset
|
||||||
@ -48,7 +48,7 @@ check_for_dblck() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
delete_oldest_backup() {
|
delete_oldest_backup() {
|
||||||
if [[ $1 > $BACKUP_AMOUNT ]]; then
|
if [[ $1 -ge $BACKUP_AMOUNT ]]; then
|
||||||
OLDEST_FILE="$(ls -t "$BACKUP_LOCATION" | grep $2 | tail -1)"
|
OLDEST_FILE="$(ls -t "$BACKUP_LOCATION" | grep $2 | tail -1)"
|
||||||
rm "$BACKUP_LOCATION"/"$OLDEST_FILE"
|
rm "$BACKUP_LOCATION"/"$OLDEST_FILE"
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user