diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2019-10-15 23:02:00 +0200 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2019-10-16 10:44:26 +0200 |
commit | 9b36399e1d4f4382a2de18d611b31612001a6c3f (patch) | |
tree | d2ebe7f7ac49470736cc29f43c81ec90fd525b78 /eclass | |
parent | font.eclass: Move while to primary shell (diff) | |
download | gentoo-9b36399e1d4f4382a2de18d611b31612001a6c3f.tar.gz gentoo-9b36399e1d4f4382a2de18d611b31612001a6c3f.tar.bz2 gentoo-9b36399e1d4f4382a2de18d611b31612001a6c3f.zip |
font.eclass: font_cleanup_dirs: Use `has` instead of `for`
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/font.eclass | 12 |
1 files 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". |