redo-sh: downgrade failures that affected dash; add a bash warning.
I feel a little dirty doing this, but the way the code was before, redo almost always picked bash as the shell. bash is way too overpowered and this led to bashisms in do scripts unnecessarily. The two failures in dash are things that I would really like to have, but they haven't materialized after 6 years, so I guess we should be realistic. To appropriately penalize bash for asking for trouble, I added a warning about [ 1 == 1 ] syntax being valid (as opposed to the POSIX correct [ 1 = 1 ]). This allows dash to be selected ahead of bash. I also moved 'sh' to the end of the list, because although it's the weakest shell on some systems, on other systems it's just bash. And I put zsh in front of bash, because fewer people have zsh and we want them to test zsh.
This commit is contained in:
parent
9354e78871
commit
0d174f92c3
3 changed files with 19 additions and 7 deletions
|
|
@ -11,8 +11,8 @@ WARN=
|
|||
# powerful ones. We want weaker shells to take precedence, as long as they
|
||||
# pass the tests, because weaker shells are more likely to point out when you
|
||||
# use some non-portable feature.
|
||||
for sh in dash sh /usr/xpg4/bin/sh ash posh mksh ksh ksh88 ksh93 pdksh \
|
||||
bash zsh busybox; do
|
||||
for sh in dash /usr/xpg4/bin/sh ash posh mksh ksh ksh88 ksh93 pdksh \
|
||||
zsh bash busybox sh; do
|
||||
printf "%-30s" "Testing $sh..."
|
||||
FOUND=`which $sh 2>/dev/null` || { echo "missing"; continue; }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue