* [patch] use POSIX equality test in check-lxdialog.sh
@ 2007-05-24 1:37 Mike Frysinger
2007-05-24 15:53 ` Jan Engelhardt
0 siblings, 1 reply; 2+ messages in thread
From: Mike Frysinger @ 2007-05-24 1:37 UTC (permalink / raw)
To: sam; +Cc: linux-kernel
The "==" operator is not in POSIX, so use -eq instead.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
index cdca738..9681476 100644
--- a/scripts/kconfig/lxdialog/check-lxdialog.sh
+++ b/scripts/kconfig/lxdialog/check-lxdialog.sh
@@ -51,7 +51,7 @@ usage() {
printf "Usage: $0 [-check compiler options|-header|-library]\n"
}
-if [ $# == 0 ]; then
+if [ $# -eq 0 ]; then
usage
exit 1
fi
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch] use POSIX equality test in check-lxdialog.sh
2007-05-24 1:37 [patch] use POSIX equality test in check-lxdialog.sh Mike Frysinger
@ 2007-05-24 15:53 ` Jan Engelhardt
0 siblings, 0 replies; 2+ messages in thread
From: Jan Engelhardt @ 2007-05-24 15:53 UTC (permalink / raw)
To: Mike Frysinger; +Cc: sam, linux-kernel
On May 23 2007 21:37, Mike Frysinger wrote:
>The "==" operator is not in POSIX, so use -eq instead.
Apart from that, == is for strings, -eq is for numbers,
so that wrong variable content can be caught
("$x" -eq 123 where x=123foo throws an error).
So yes, the patch is good.
Jan
--
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-05-24 15:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-24 1:37 [patch] use POSIX equality test in check-lxdialog.sh Mike Frysinger
2007-05-24 15:53 ` Jan Engelhardt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox