From: Arnout Vandecappelle Date: Mon, 13 Jul 2015 23:45:27 +0000 (+0200) Subject: purge-locales: further refactoring after removing man paths X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=805240bae841c221c1dc6d42b07fca31d595e298;p=buildroot.git purge-locales: further refactoring after removing man paths Since the man paths have been removed, it is no longer necessary to grep them out and the loop can be simplified. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) Cc: Thomas Petazzoni Signed-off-by: Thomas Petazzoni --- diff --git a/Makefile b/Makefile index 02a1032442..f764ae5419 100644 --- a/Makefile +++ b/Makefile @@ -546,9 +546,9 @@ define PURGE_LOCALES for dir in $(wildcard $(addprefix $(TARGET_DIR),/usr/share/locale /usr/share/X11/locale /usr/lib/locale)); \ do \ - for lang in $$(cd $$dir; ls .|grep -v man); \ + for langdir in $$dir/*; \ do \ - grep -qx $$lang $(LOCALE_WHITELIST) || rm -rf $$dir/$$lang; \ + grep -qx $${langdir##*/} $(LOCALE_WHITELIST) || rm -rf $$langdir; \ done; \ done endef