checkbashisms, available at http://sourceforge.net/projects/checkbaskisms/,
might help some catch problems. Though it misses all of the troublesome
constructs, except for assignment in an export statement, listed above.
+
+The "Portable Shell" section of the Autoconf info manual has a wealth
+of tips for avoiding portability problems in shell scripts. It might
+be available by entering: info autoconf portable.
cur=`mhpath cur`
# Verify that Message-ID is of the right form. We'll see how
# portable these grep regular expressions are.
- case "$msgid_style" in
+ case $msgid_style in
localname)
# e.g., Message-ID: <5348.1342884222@localhost.localdomain>
id='^Message-ID: <[0-9]\{1,\}\.[0-9]\{1,\}@'
whatnowtest=`echo cd | TERM=dumb whatnow -prompt ''`
set -e
-case "${whatnowtest}" in
+case ${whatnowtest} in
cd) cat > "$expected" <<EOF
attach $testname_quoted
alist
whatnowtest=`echo cd | TERM=dumb whatnow -prompt ''`
set -e
-case "${whatnowtest}" in
+case ${whatnowtest} in
cd) cat > "$expected" <<EOF
cd ${MH_TEST_DIR}/foo\'s\ bar
pwd
whatnowtest=`echo cd | TERM=dumb whatnow -prompt ''`
set -e
-case "${whatnowtest}" in
+case ${whatnowtest} in
cd) cat > "$expected" <<EOF
baz
boz