From dda775c7ca2015bb9bf159f30d95a5b33971bdef Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Tue, 7 Oct 2008 11:36:48 +0200 Subject: [PATCH] Avoid race conditions in the export script. --- scripts/pciids-export | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/pciids-export b/scripts/pciids-export index b129fff..c607cb5 100755 --- a/scripts/pciids-export +++ b/scripts/pciids-export @@ -35,9 +35,13 @@ if ! [ -f docs/pci.ids.nohead ] || ! cmp docs/pci.ids.nohead pci.ids.new >/dev/n ln -f pci.ids.final docs/v2.2/pci.ids ln -f pci.ids.new docs/pci.ids.nohead rm pci.ids.final - bzip2 -9c docs/pci.ids.bz2 + + bzip2 -9c docs/pci.ids.bz2.new + mv docs/pci.ids.bz2.new docs/pci.ids.bz2 ln -f docs/pci.ids.bz2 docs/v2.2/ - gzip -9c docs/pci.ids.gz + + gzip -9c docs/pci.ids.gz.new + mv docs/pci.ids.gz.new docs/pci.ids.gz ln -f docs/pci.ids.gz docs/v2.2/ fi -- 2.39.2