]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
dg-cmp-results.sh: Do not print usage if either .sum file cannot be opened...
authorBen Elliston <bje@au.ibm.com>
Tue, 18 Nov 2008 22:00:42 +0000 (22:00 +0000)
committerBen Elliston <bje@gcc.gnu.org>
Tue, 18 Nov 2008 22:00:42 +0000 (09:00 +1100)
* dg-cmp-results.sh: Do not print usage if either .sum file cannot
be opened; print a more meaningful error instead.

From-SVN: r141979

contrib/ChangeLog
contrib/dg-cmp-results.sh

index 5bdf4a2c9bfa9f26a9f71e596ad873953066c627..4f49364ef3d10e367ed8ea48e502cede8a3a1b9f 100644 (file)
@@ -1,3 +1,8 @@
+2008-11-18  Ben Elliston  <bje@au.ibm.com>
+
+       * dg-cmp-results.sh: Do not print usage if either .sum file cannot
+       be opened; print a more meaningful error instead.
+
 2008-10-24  Janis Johnson  <janis187@us.ibm.com>
            Jakub Jelinek  <jakub@redhat.com>
 
index 753005db2048611494f32c368dba0d552980048e..d291769547dcd2a02ecf6f80d60d6be7802af4fd 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright (C) 2006 Free Software Foundation
+# Copyright (C) 2006, 2008 Free Software Foundation
 #
 # Analyze changes in GCC DejaGNU test logs for binutils, gcc, gdb, etc.
 # Original version written in 2005 by James Lemke <jwlemke@wasabisystems.com>.
@@ -27,11 +27,21 @@ while test "$1" = "-v"; do
     shift
 done
 
-if test $# -ne 3 -o ! -f "$2" -o ! -f "$3"; then
+if test $# -ne 3 ; then
     usage
     exit 1
 fi
 
+if test ! -f "$2"; then
+    echo "unable to open $2" >&2
+    exit 1
+fi
+
+if test ! -f "$3"; then
+    echo "unable to open $3" >&2
+    exit 1
+fi
+
 # Command differences for various platforms.
 case `uname -s` in
 Darwin|NetBSD)