Lines Matching +full:- +full:- +full:quiet
3 set -e
5 SRC="https://pci-ids.ucw.cz/v2.2/pci.ids"
10 USER_AGENT=update-pciids/$VERSION
11 QUIET=
13 [ "$1" = "-q" ] && quiet=true || quiet=false
15 # if pci.ids is read-only (because the filesystem is read-only),
18 ${quiet} || echo "${DEST} is read-only, exiting." 1>&2
22 if command -v xz >/dev/null 2>&1 ; then
23 DECOMP="xz -d"
25 elif command -v bzip2 >/dev/null 2>&1 ; then
26 DECOMP="bzip2 -d"
28 elif command -v gzip >/dev/null 2>&1 ; then
29 DECOMP="gzip -d"
35 if command -v curl >/dev/null 2>&1 ; then
36 ${quiet} && QUIET="-s -S"
39 curl -o $DEST.new --user-agent "$USER_AGENT curl" $QUIET $SRC
41 elif command -v wget >/dev/null 2>&1 ; then
42 ${quiet} && QUIET="-q"
45 wget --no-timestamping -O $DEST.new --user-agent "$USER_AGENT wget" $QUIET $SRC
47 elif command -v lynx >/dev/null 2>&1 ; then
50 lynx -source -useragent="$USER_AGENT lynx" $SRC >$DEST.new
53 echo >&2 "update-pciids: cannot find curl, wget or lynx"
58 echo >&2 "update-pciids: download failed"
59 rm -f $DEST.new
64 echo >&2 "update-pciids: decompression failed, probably truncated file"
69 echo >&2 "update-pciids: missing class info, probably truncated file"
73 if [ -f $DEST ] ; then
74 ln -f $DEST $DEST.old
75 # --reference is supported only by chmod from GNU file, so let's ignore any errors
76 chmod -f --reference=$DEST.old $DEST.new $DEST.new.plain 2>/dev/null || true
85 rm -f $DEST.new.plain
88 rm -f $DEST.new
94 rm -f ${DEST%.gz} ${DEST%.gz}.old
97 ${quiet} || echo "Done."