]> mj.ucw.cz Git - pciutils.git/commitdiff
update-pciids: Move quiet setting after set -e
authorGuillem Jover <guillem@hadrons.org>
Wed, 23 Sep 2020 17:54:16 +0000 (19:54 +0200)
committerGuillem Jover <guillem@hadrons.org>
Wed, 23 Sep 2020 17:54:16 +0000 (19:54 +0200)
We should set -e as the first thing to catch any errors, so move the
quiet setup after the other variables setup.

update-pciids.sh

index 2e241208d342aa02c2cd59e7c457577747d3c790..5a02ca25dfcd32b7067c270d3a4a1a019fc65d30 100755 (executable)
@@ -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