pacman-boot-backup-hook: auto updated to 1.7-1

This commit is contained in:
Lilac 2024-01-15 18:34:32 +00:00
parent 68b6a57240
commit 05b7b7e422
7 changed files with 148 additions and 0 deletions

View file

@ -0,0 +1,10 @@
#!/bin/bash
[[ "$1" != "pre" && "$1" != "post" ]] && exit 1
[[ -f /etc/pacman-boot-backup.conf ]] && . /etc/pacman-boot-backup.conf
BACKUP_PATH_DEST=${BACKUP_PATH_DEST:-/.bootbackup}/$1
rm -rf "${BACKUP_PATH_DEST}"
mkdir -p "${BACKUP_PATH_DEST}"
cp -aT /boot "${BACKUP_PATH_DEST}"