Custom delete query

This commit is contained in:
LinuxSquare 2023-09-29 21:32:02 +02:00
parent 396dc38a8a
commit 7393fbc55f

View file

@ -81,7 +81,14 @@ for arrval in $(find $bedir -mindepth 1 -maxdepth 1 -type d | grep @root | cut -
bootenvs+=("$arrval")
done
rm -f $grubdir/*
# Files, which won't be deleted
declare keepfiles=("00_header" "30_uefi-firmware")
for toDelete in $(ls $grubdir); do
if echo ${keepfiles[@]} | grep -q $toDelete; then
rm -f $grubdir/$toDelete
fi
done
for be in ${bootenvs[@]}; do
parseTimestampHuman "$be"
parseTimestamp "$be"