Match tag exactly for deletion by only checking what's between the periods.

This commit is contained in:
2025-11-28 15:05:35 -07:00
parent 1796a21579
commit 0371059706

View File

@@ -60,7 +60,7 @@ chown -Rv root:root "$BACKUP_DIR"
# Remove the last backup. # Remove the last backup.
echo "`date` - Removing existing files." echo "`date` - Removing existing files."
cd "$BACKUP_DIR" cd "$BACKUP_DIR"
mv -v "$BASENAME"*"$TAG"* TRASH/ mv -v "$BASENAME."*".$TAG."* TRASH/
rm -v TRASH/* rm -v TRASH/*
if [[ "$down" == "TRUE" ]]; then if [[ "$down" == "TRUE" ]]; then