missing: miscellaneous fixlets
authorStefano Lattarini <stefano.lattarini@gmail.com>
Sun, 30 Oct 2011 08:57:50 +0000 (09:57 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 22 Dec 2011 11:08:30 +0000 (12:08 +0100)
* lib/missing: Some shells, such as Solaris or FreeBSD /bin/sh,
warn about missing programs before performing redirections.
Therefore, where we have to silently check whether a program
exists, perform redirections on a subshell.
Remove redundant uses of double-quotes in variable definitions.
Delete an extra blank line.

ChangeLog
lib/missing

index 49b6e8b..2d2bcdb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2011-12-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       missing: miscellaneous fixlets
+       * lib/missing: Some shells, such as Solaris or FreeBSD /bin/sh,
+       warn about missing programs before performing redirections.
+       Therefore, where we have to silently check whether a program
+       exists, perform redirections on a subshell.
+       Remove redundant uses of double-quotes in variable definitions.
+       Delete an extra blank line.
+
 2011-12-20  Peter Rosin  <peda@lysator.liu.se>
 
        tests: fix spurious failure on systems lacking unistd.h
index 28055d2..df2faf6 100755 (executable)
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Common stub for a few missing GNU programs while installing.
 
-scriptversion=2009-04-28.21; # UTC
+scriptversion=2011-12-22.11; # UTC
 
 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
-# 2008, 2009 Free Software Foundation, Inc.
+# 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
 # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
 
 # This program is free software; you can redistribute it and/or modify
@@ -226,7 +226,7 @@ WARNING: \`$1' $msg.  You should only need it if
          \`Bison' from any GNU archive site."
     rm -f y.tab.c y.tab.h
     if test $# -ne 1; then
-        eval LASTARG="\${$#}"
+        eval LASTARG=\${$#}
        case $LASTARG in
        *.y)
            SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
@@ -256,7 +256,7 @@ WARNING: \`$1' is $msg.  You should only need it if
          \`Flex' from any GNU archive site."
     rm -f lex.yy.c
     if test $# -ne 1; then
-        eval LASTARG="\${$#}"
+        eval LASTARG=\${$#}
        case $LASTARG in
        *.l)
            SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
@@ -320,17 +320,16 @@ WARNING: \`$1' is $msg.  You should only need it if
 
   tar*)
     shift
-
     # We have already tried tar in the generic part.
     # Look for gnutar/gtar before invocation to avoid ugly error
     # messages.
-    if (gnutar --version > /dev/null 2>&1); then
+    if (gnutar --version) > /dev/null 2>&1; then
        gnutar "$@" && exit 0
     fi
-    if (gtar --version > /dev/null 2>&1); then
+    if (gtar --version) > /dev/null 2>&1; then
        gtar "$@" && exit 0
     fi
-    firstarg="$1"
+    firstarg=$1
     if shift; then
        case $firstarg in
        *o*)