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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>From ced082632d496645736f245b6a6482bdbf267579 Mon Sep 17 00:00:00 2001
From: Christian Inci <chris.pcguy.inci@xxxxxxxxx>
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 <mj@xxxxxx> for the hint.

Signed-off-by: Christian Inci <chris.pcguy.inci@xxxxxxxxx>
---
 update-pciids.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/update-pciids.sh b/update-pciids.sh
index 5e77109..51397f1 100755
--- a/update-pciids.sh
+++ b/update-pciids.sh
@@ -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
-- 
1.7.7.4
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux