4 SRC="http://pciids.sourceforge.net/v2.2/pci.ids"
9 if [ -n "$PCI_COMPRESSED_IDS" ] ; then
13 elif which bzip2 >/dev/null ; then
16 elif which gzip >/dev/null ; then
23 if which curl >/dev/null ; then
24 DL="curl -o $DEST.new $SRC"
25 elif which wget >/dev/null ; then
26 DL="wget -O $DEST.new $SRC"
27 elif which lynx >/dev/null ; then
28 DL="eval lynx -source $SRC >$DEST.new"
30 echo >&2 "update-pciids: cannot find curl, wget or lynx"
35 echo >&2 "update-pciids: download failed"
40 if ! $DECOMP <$DEST.new >$DEST.neww ; then
41 echo >&2 "update-pciids: decompression failed, probably truncated file"
45 if ! $GREP >/dev/null "^C " $DEST.neww ; then
46 echo >&2 "update-pciids: missing class info, probably truncated file"
50 if [ -f $DEST ] ; then
52 # --reference is supported only by chmod from GNU file, so let's ignore any errors
53 chmod -f --reference=$DEST.old $DEST.neww 2>/dev/null || true