X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=blobdiff_plain;f=contrib%2Fdg-cmp-results.sh;h=d291769547dcd2a02ecf6f80d60d6be7802af4fd;hp=753005db2048611494f32c368dba0d552980048e;hb=da982362f10f6955efd57fa4d59a399a18f9d226;hpb=411c3b5d2c54f061cffccc7e03a3ac5eedb27b38;ds=sidebyside diff --git a/contrib/dg-cmp-results.sh b/contrib/dg-cmp-results.sh index 753005db204..d291769547d 100755 --- a/contrib/dg-cmp-results.sh +++ b/contrib/dg-cmp-results.sh @@ -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 . @@ -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)