From b6a0091e4a17dcc01c84dfe233e861fe6e82b1c4 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Wed, 23 Sep 2020 19:56:57 +0200 Subject: [PATCH] update-pciids: Make the backup with a hardlink instead of a move If we move the file while making a backup, we can end up with no pci.ids database in case the next step fails. --- update-pciids.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update-pciids.sh b/update-pciids.sh index 42faeea..3ea4690 100755 --- a/update-pciids.sh +++ b/update-pciids.sh @@ -60,7 +60,7 @@ if ! $GREP >/dev/null "^C " $DEST.neww ; then fi if [ -f $DEST ] ; then - mv $DEST $DEST.old + ln -f $DEST $DEST.old # --reference is supported only by chmod from GNU file, so let's ignore any errors chmod -f --reference=$DEST.old $DEST.neww 2>/dev/null || true fi -- 2.39.5