[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 407e6be: * indent/shell.sh (bar): Use '[ $# -eq 0 ]
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] master 407e6be: * indent/shell.sh (bar): Use '[ $# -eq 0 ]', not '[ $# == 0 ]'. |
Date: |
Sun, 25 Jan 2015 03:02:11 +0000 |
branch: master
commit 407e6beeb3c37947c7c92bf0d230973bf133afde
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>
* indent/shell.sh (bar): Use '[ $# -eq 0 ]', not '[ $# == 0 ]'.
This is more portable in shell scripts.
Fixes: bug#19658
---
test/ChangeLog | 6 ++++++
test/indent/shell.sh | 16 ++++++++--------
2 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/test/ChangeLog b/test/ChangeLog
index 5a4e616..d8cd367 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,9 @@
+2015-01-25 Paul Eggert <address@hidden>
+
+ * indent/shell.sh (bar): Use '[ $# -eq 0 ]', not '[ $# == 0 ]'.
+ This is more portable in shell scripts.
+ Fixes: bug#19658
+
2015-01-23 Dmitry Gutov <address@hidden>
Fix package tests when TMPDIR is in HOME. (Bug#19657)
diff --git a/test/indent/shell.sh b/test/indent/shell.sh
index 14f6774..b0f69bd 100755
--- a/test/indent/shell.sh
+++ b/test/indent/shell.sh
@@ -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
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 407e6be: * indent/shell.sh (bar): Use '[ $# -eq 0 ]', not '[ $# == 0 ]'.,
Paul Eggert <=