svn commit: r294355 - head/tools/build
Bryan Drewery
bdrewery at FreeBSD.org
Tue Jan 19 22:42:11 UTC 2016
Author: bdrewery
Date: Tue Jan 19 22:42:10 2016
New Revision: 294355
URL: https://svnweb.freebsd.org/changeset/base/294355
Log:
Validate that the file exists rather than obscure 'Not an elf file' error.
Sponsored by: EMC / Isilon Storage Division
Modified:
head/tools/build/check-links.sh
Modified: head/tools/build/check-links.sh
==============================================================================
--- head/tools/build/check-links.sh Tue Jan 19 22:42:07 2016 (r294354)
+++ head/tools/build/check-links.sh Tue Jan 19 22:42:10 2016 (r294355)
@@ -29,6 +29,11 @@ while getopts "Uv" flag; do
done
shift $((OPTIND-1))
+if ! [ -f "$1" ]; then
+ echo "No such file or directory: $1" >&2
+ exit 1
+fi
+
mime=$(file -L --mime-type $1)
isbin=0
case $mime in
More information about the svn-src-all
mailing list