mirror of
https://github.com/KDE/kde-linux.git
synced 2025-12-23 16:08:29 -05:00
Unduplicate udev package cleanup code
Two backup directories for each package don't need to exist. Combine them into the one.
This commit is contained in:
@@ -21,18 +21,11 @@ if [ -f "$SRCDIR/.secure_files/gpg.public.key" ]; then # only useful and availab
|
||||
# https://invent.kde.org/kde-linux/kde-linux/-/issues/199
|
||||
fi
|
||||
|
||||
# Uninstall solaar, but keep its udev rules.
|
||||
# Uninstall solaar and sane, but keep their udev rules.
|
||||
# This ensures that they stay up to date.
|
||||
UDEV_BACKUP_DIR=$(mktemp -d)
|
||||
pacman -Qlq solaar | grep '^/usr/lib/udev/' | xargs -r cp -a --parents -t "$UDEV_BACKUP_DIR"
|
||||
pacman -Rns --noconfirm solaar
|
||||
|
||||
# Uninstall sane, but keep its udev rules.
|
||||
# This ensures that they stay up to date.
|
||||
UDEV_BACKUP_DIR=$(mktemp -d)
|
||||
pacman -Qlq sane | grep '^/usr/lib/udev/' | xargs -r cp -a --parents -t "$UDEV_BACKUP_DIR"
|
||||
pacman -Rns --noconfirm sane
|
||||
|
||||
pacman -Qlq solaar sane | grep '^/usr/lib/udev/' | xargs -r cp -a --parents -t "$UDEV_BACKUP_DIR"
|
||||
pacman -Rns --noconfirm solaar sane
|
||||
cp -a "$UDEV_BACKUP_DIR"/* /
|
||||
rm -rf "$UDEV_BACKUP_DIR"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user