From: Tom de Vries Date: Tue, 12 May 2015 16:23:11 +0000 (+0000) Subject: check_GNU_style.sh: Check file presence X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0648b80726f03dd0b9ed3dbb56832dbb909502f7;p=gcc.git check_GNU_style.sh: Check file presence 2015-05-12 Tom de Vries * check_GNU_style.sh: Check if files exists. From-SVN: r223085 --- diff --git a/contrib/ChangeLog b/contrib/ChangeLog index 774e46f96f8..605950a1c48 100644 --- a/contrib/ChangeLog +++ b/contrib/ChangeLog @@ -1,3 +1,7 @@ +2015-05-12 Tom de Vries + + * check_GNU_style.sh: Check if files exists. + 2015-05-12 Tom de Vries * check_GNU_style.sh: Don't use a filename prefix if we're only diff --git a/contrib/check_GNU_style.sh b/contrib/check_GNU_style.sh index eeff48f8c4c..2c4d9e24fe6 100755 --- a/contrib/check_GNU_style.sh +++ b/contrib/check_GNU_style.sh @@ -39,6 +39,13 @@ test $# -eq 0 && usage nfiles=$# files="$*" +for f in $files; do + if [ "$f" != "-" ] && [ ! -f "$f" ]; then + echo "error: could not read file: $f" + exit 1 + fi +done + inp=check_GNU_style.inp tmp=check_GNU_style.tmp