From 1bbdea177145bda99f0ab11c23170d1e335d11a9 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Mon, 13 Mar 2006 19:12:46 +0000 Subject: [PATCH] Use curl if available. git-archimport-id: mj@ucw.cz--public/pciutils--main--2.2--patch-92 --- ChangeLog | 4 ++++ update-pciids.man | 2 +- update-pciids.sh | 6 ++++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6a9acb4..51fc299 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2006-03-13 Martin Mares + + * update-pciids.sh: Use curl if available. Patch by Matthew Wilcox. + 2006-01-04 Martin Mares * lspci.c (show_express_link): Fixed decoding of link status register. diff --git a/update-pciids.man b/update-pciids.man index e28dcab..d2ee69c 100644 --- a/update-pciids.man +++ b/update-pciids.man @@ -12,7 +12,7 @@ update-pciids \- download new version of the PCI ID list fetches the current version of the pci.ids file from the primary distribution site and installs it. -This utility requires either wget or lynx to be installed. If gzip or bzip2 +This utility requires curl, wget or lynx to be installed. If gzip or bzip2 are available, it automatically downloads the compressed version of the list. .SH FILES diff --git a/update-pciids.sh b/update-pciids.sh index 146a393..0e21dff 100755 --- a/update-pciids.sh +++ b/update-pciids.sh @@ -14,12 +14,14 @@ else DECOMP="cat" fi -if which wget >/dev/null ; then +if which curl >/dev/null ; then + DL="curl -o $DEST.new $SRC" +elif which wget >/dev/null ; then DL="wget -O $DEST.new $SRC" elif which lynx >/dev/null ; then DL="eval lynx -source $SRC >$DEST.new" else - echo >&2 "update-pciids: cannot find wget nor lynx" + echo >&2 "update-pciids: cannot find curl, wget or lynx" exit 1 fi -- 2.39.2