libmakepkg: only output package file names when checking for build references

The leading directory is distraction from identifying the files containing
build references.

Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Allan McRae 2017-10-08 23:34:48 +10:00
parent 62bfba53db
commit e4f13e62cf

View file

@ -34,7 +34,7 @@ warn_build_references() {
mapfile -t refs < <(find "$pkgdir" -type f -exec grep -l "${!var}" {} +)
if (( ${#refs} > 0 )); then
warning "$(gettext 'Package contains reference to %s')" "\$$var"
printf '%s\n' "${refs[@]}" >&2
printf '%s\n' "${refs[@]#"$pkgdir/"}" >&2
fi
done
return 0