Subject: bug#19658: closed (Re: unportable test(1) comparison operator)

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 25 Jan 2015 03:04:03 +0000

Your bug report

#19658: unportable test(1) comparison operator

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
19658: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19658
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: unportable test(1) comparison operator
From: Paul Eggert <[email-masked]>
To: [email-masked]
Date: Sat, 24 Jan 2015 19:03:47 -0800
List-Id: <debbugs-submit.debbugs.gnu.org>

Thanks I changed it to '[ $# -eq 0 ]', which is more portable yet, as it works 
even if a purposely-pedantic shell sets $# to '00'.

Subject: unportable test(1) comparison operator
From: Thomas Klausner <[email-masked]>
To: [email-masked]
Date: Fri, 23 Jan 2015 00:10:07 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi!

In emacs git as of yesterday, test/indent/shell.sh contains the
unportable '==' comparison operator for test(1) -- only bash supports
that, not even GNU coreutils' test(1).

Please use '=' instead; see attached patch.

Thanks,
 Thomas

P.S.: I know it's not intended to be executed, but I'd like to avoid
having bad examples around :)

--- test/indent/shell.sh.orig	2011-02-16 02:00:00.000000000 +0000
+++ test/indent/shell.sh
@@ -70,7 +70,7 @@ help2
 EOF2
 }
 bar () {
-    if [ $# == 0 ]; then
+    if [ $# = 0 ]; then
         while
             f                   # KNOWN INDENT BUG
         do