1 --- a/update-usbids.sh.in
2 +++ b/update-usbids.sh.in
6 SRC="http://www.linux-usb.org/usb.ids"
10 -# if usb.ids is read-only (because the filesystem is read-only),
11 +# if usb.ids.gz is read-only (because the filesystem is read-only),
12 # then just skip this whole process.
13 if ! touch ${DEST} >&2 >/dev/null ; then
14 ${quiet} || echo "${DEST} is read-only, exiting."
15 @@ -16,10 +16,10 @@ if ! touch ${DEST} >&2 >/dev/null ; then
18 if which wget >/dev/null 2>&1 ; then
19 - DL="wget -O $DEST.new $SRC"
20 + DL="eval wget -O- $SRC | gzip >$DEST.new"
21 ${quiet} && DL="$DL -q"
22 elif which lynx >/dev/null 2>&1 ; then
23 - DL="eval lynx -source $SRC >$DEST.new"
24 + DL="eval lynx -source $SRC | gzip >$DEST.new"
26 echo >&2 "update-usbids: cannot find wget nor lynx"
28 @@ -31,7 +31,7 @@ if ! $DL ; then
32 -if ! grep >/dev/null "^C " $DEST.new ; then
33 +if ! zcat $DEST.new | grep >/dev/null "^C " ; then
34 echo >&2 "update-usbids: missing class info, probably truncated file"