commit: 9b36399e1d4f4382a2de18d611b31612001a6c3f
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 15 21:02:00 2019 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Wed Oct 16 08:44:26 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9b36399e
font.eclass: font_cleanup_dirs: Use `has` instead of `for`
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
eclass/font.eclass | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/eclass/font.eclass b/eclass/font.eclass
index 70162100284..76c20549ea6 100644
--- a/eclass/font.eclass
+++ b/eclass/font.eclass
@@ -113,13 +113,11 @@ font_cleanup_dirs() {
generated=false
# make sure this is a file and not a subdir
[[ -e ${f} || -L ${f} ]] || continue
- for g in ${genfiles}; do
- if [[ ${f##*/} == ${g} ]]; then
- # this is a generated file
- generated=true
- break
- fi
- done
+ if has ${f##*/} ${genfiles}; then
+ # this is a generated file
+ generated=true
+ break
+ fi
# if the file is a generated file then we know this is
a font dir (as
# opposed to something like encodings or util) and a
candidate for
# removal. if it's not generated then it's an
"otherfile".