From ba8ca25ed400586f8fd2f8468b261c5ea0da197f Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Tue, 6 Nov 2012 09:15:51 -0800 Subject: [PATCH] update-pciutils-dist --- Makefile | 2 +- update-pciids.sh | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 0a21ee8..28561a6 100644 --- a/Makefile +++ b/Makefile @@ -85,7 +85,7 @@ lspci: LDLIBS+=$(LIBKMOD_LIBS) ls-kernel.o: CFLAGS+=$(LIBKMOD_CFLAGS) update-pciids: update-pciids.sh - sed <$< >$@ "s@^DEST=.*@DEST=$(IDSDIR)/$(PCI_IDS)@;s@^PCI_COMPRESSED_IDS=.*@PCI_COMPRESSED_IDS=$(PCI_COMPRESSED_IDS)@" + sed <$< >$@ "s@^DEST=.*@DEST=$(IDSDIR)/pci.ids.d/pci.ids.dist@;s@^PCI_COMPRESSED_IDS=.*@PCI_COMPRESSED_IDS=@" chmod +x $@ # The example of use of libpci diff --git a/update-pciids.sh b/update-pciids.sh index ab68d12..0c4d755 100755 --- a/update-pciids.sh +++ b/update-pciids.sh @@ -4,7 +4,7 @@ set -e SRC="http://pci-ids.ucw.cz/v2.2/pci.ids" -DEST=pci.ids +DEST=pci.ids.d/pci.ids.dist PCI_COMPRESSED_IDS= GREP=grep @@ -66,6 +66,13 @@ fi mv $DEST.neww $DEST rm $DEST.new +if [ -x /usr/bin/merge-pciids -a -x /usr/bin/perl ]; then + merge-pciids +else + echo "WARNING: merge-pciids or perl missing" + cp -p $DEST /usr/share/pci.ids +fi + # Older versions did not compress the ids file, so let's make sure we # clean that up. if [ ${DEST%.gz} != ${DEST} ] ; then -- 2.34.1