ACC SHELL
Path : /usr/bin/ |
|
Current File : //usr/bin/merge-pciids |
#!/bin/bash
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Anna Bernathova <anicka@novell.com> 2007
# Wrapper for calling merge-pciids.pl
IDSD_PATH="/usr/share/pci.ids.d"
MASTER_IDS="/usr/share/pci.ids.d/pci.ids.dist"
UPSTREAM_MERGE_SCRIPT="/usr/bin/merge-pciids.pl"
PCI_IDS="/usr/share/pci.ids"
if [ ! -f $MASTER_IDS ]; then
echo "ERROR: $MASTER_IDS not found, giving up" >&2
exit 1
fi
tmpfile=`mktemp /tmp/pci.ids.XXXXXXXX` || exit 1
$UPSTREAM_MERGE_SCRIPT $IDSD_PATH/* > $tmpfile
if [ $? -eq 0 ]; then
cp $tmpfile $PCI_IDS
else
cp $MASTER_IDS $PCI_IDS
echo "WARNING: Merge not successfull, using master pci.ids file" >&2
fi
rm $tmpfile
chmod 644 $PCI_IDS
exit 0
ACC SHELL 2018