From: Guillem Jover Date: Wed, 23 Sep 2020 17:54:16 +0000 (+0200) Subject: update-pciids: Move quiet setting after set -e X-Git-Tag: v3.8.0~104^2~2 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=20e206ec4837d81c5bbc30880c4cae2a4432aece;p=pciutils.git update-pciids: Move quiet setting after set -e We should set -e as the first thing to catch any errors, so move the quiet setup after the other variables setup. --- diff --git a/update-pciids.sh b/update-pciids.sh index 2e24120..5a02ca2 100755 --- a/update-pciids.sh +++ b/update-pciids.sh @@ -1,13 +1,13 @@ #!/bin/sh -[ "$1" = "-q" ] && quiet=true || quiet=false - set -e SRC="https://pci-ids.ucw.cz/v2.2/pci.ids" DEST=pci.ids PCI_COMPRESSED_IDS= GREP=grep +[ "$1" = "-q" ] && quiet=true || quiet=false + # if pci.ids is read-only (because the filesystem is read-only), # then just skip this whole process. if ! touch ${DEST} >/dev/null 2>&1 ; then