From 9b36399e1d4f4382a2de18d611b31612001a6c3f Mon Sep 17 00:00:00 2001 From: Andreas Sturmlechner Date: Tue, 15 Oct 2019 23:02:00 +0200 Subject: [PATCH] font.eclass: font_cleanup_dirs: Use `has` instead of `for` Signed-off-by: Andreas Sturmlechner --- eclass/font.eclass | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/eclass/font.eclass b/eclass/font.eclass index 701621002845..76c20549ea64 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". -- 2.26.2