Skip to contentSkip to conversation

: fix for a bash issue regarding a variable in update-pciids (try 2)

PATCH New Christian Inci 1 participant 1 message Dec 23, 2011 PCI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 : fix for a bash issue regarding a variable in update-pciids (try 2)

Quoted 1 line

From ced082632d496645736f245b6a6482bdbf267579 Mon Sep 17 00:00:00 2001

From: Christian Inci <[email protected]>
Date: Fri, 23 Dec 2011 17:24:56 +0100
Subject: [PATCH]: fix for a bash issue regarding a variable ... (try 2)
in update-pciids At least some bash versions can and
will complain about an empty PCI_COMPRESSED_IDS variable, when it get used in the 'if'-statement.

Try 2: change the comparison operand instead of the value.
Many thanks to Martin Mares <[email protected]> for the hint.

---
 update-pciids.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
update-pciids.sh +1 -1
index 5e77109..51397f1 100755
@@ -15,7 +15,7 @@ if ! touch ${DEST} >/dev/null 2>&1 ; then
 	exit 1
 fi
 
-if [ "$PCI_COMPRESSED_IDS" -eq 1 ] ; then
+if [ "$PCI_COMPRESSED_IDS" == 1 ] ; then
 	DECOMP="cat"
 	SRC="$SRC.gz"
 	GREP=zgrep
Signature · 1 line
1.7.7.4