diff options
author | bdrewery <bdrewery@FreeBSD.org> | 2016-01-19 22:42:10 +0000 |
---|---|---|
committer | bdrewery <bdrewery@FreeBSD.org> | 2016-01-19 22:42:10 +0000 |
commit | ced78889471e1d8dc5167c73591afb479605b9b1 (patch) | |
tree | 572f7e9d63a8784087a541511cdd73d9bb9c4fb8 /tools/build | |
parent | 6a65b1568ab2f1720e59f5a90efd4d6d007f43a0 (diff) | |
download | FreeBSD-src-ced78889471e1d8dc5167c73591afb479605b9b1.zip FreeBSD-src-ced78889471e1d8dc5167c73591afb479605b9b1.tar.gz |
Validate that the file exists rather than obscure 'Not an elf file' error.
Sponsored by: EMC / Isilon Storage Division
Diffstat (limited to 'tools/build')
-rwxr-xr-x | tools/build/check-links.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/build/check-links.sh b/tools/build/check-links.sh index 57c9437..80e1ad1 100755 --- a/tools/build/check-links.sh +++ b/tools/build/check-links.sh @@ -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 |