]> git.eshelyaron.com Git - emacs.git/commitdiff
* indent/shell.sh (bar): Use '[ $# -eq 0 ]', not '[ $# == 0 ]'.
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 25 Jan 2015 03:00:41 +0000 (19:00 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 25 Jan 2015 03:02:07 +0000 (19:02 -0800)
This is more portable in shell scripts.
Fixes: bug#19658
test/ChangeLog
test/indent/shell.sh

index 5a4e616f6c6c251220fcfdae068a4666486ac33e..d8cd36790f2ccb0dc7655514a216bb171abe9bd9 100644 (file)
@@ -1,3 +1,9 @@
+2015-01-25  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * indent/shell.sh (bar): Use '[ $# -eq 0 ]', not '[ $# == 0 ]'.
+       This is more portable in shell scripts.
+       Fixes: bug#19658
+
 2015-01-23  Dmitry Gutov  <dgutov@yandex.ru>
 
        Fix package tests when TMPDIR is in HOME.  (Bug#19657)
index 14f67744ff2565c27079c8ef4adfe5c14e0f1342..b0f69bd9720e065e09cae2a4bd1260ccf18e20e9 100755 (executable)
@@ -100,7 +100,7 @@ foo () {
         d)
             echo 3;;
     esac
-    
+
     case $as_nl`(ac_space=' '; set) 2>&1` in #(
         *${as_nl}ac_space=\ *)
             # `set' does not quote correctly, so add quotes: double-quote
@@ -117,7 +117,7 @@ foo () {
     esac |
         grep '.' |              # KNOWN INDENT BUG
         sed 1d
-    
+
     case toto in
         -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
             | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* \
@@ -133,7 +133,7 @@ foo () {
         5) hello ;;
         5) hello ;;
     esac
-    
+
     echo "'" wfgfe
 
     #!/bin/bash
@@ -152,7 +152,7 @@ help2
 EOF2
 }
 bar () {
-    if [ $# == 0 ]; then
+    if [ $# -eq 0 ]; then
         while
             f                   # KNOWN INDENT BUG
         do
@@ -163,18 +163,18 @@ bar () {
             # adsgsdg
             echo "screwed up"
         fi
-        
+
         $@ $? $#
-        
+
         for f in *
         do
             sdfg
         done
-        
+
         if swrgfef
         then blas
         else sdf
         fi
-        
+
     fi
 }