From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] vim: be more careful when removing the documentation
Date: Mon, 5 Dec 2016 13:09:30 +0100 [thread overview]
Message-ID: <20161205130930.62ccc373@free-electrons.com> (raw)
In-Reply-To: <CAEGTJuPZKHuu5qd9gK-GyhPkxXdV+X0+V6RAvdX_rmJ5h4vPMg@mail.gmail.com>
Hello,
On Mon, 05 Dec 2016 12:03:45 +0000, Mateusz Furdyna wrote:
> How about we are even more careful, for instance when vim version changes
> and also the directory name changes to sth like vim81?
>
> like so:
>
> define VIM_REMOVE_DOCS
> - find $(TARGET_DIR)/usr/share/vim -type f -name "*.txt" -delete
> + $(RM) -rf $(find $(TARGET_DIR)/usr/share/vim -type d -name "doc")
> endef
>
> Rationale:
> * we cannot use find -delete because it doesn't work on empty directories
> * we cannot use find -exec rm... because it then tries to traverse
> directories it has just removed
> * we probably cannot use rm -rf /usr/share/vim/vim80/doc, because then we
> have vim version hardcoded into the path
> * we must use -f flag in case find returns nothing OR we try to delete doc
> directory nested in another doc directory that we've just deleted...
>
> What do you think?
What about just:
$(RM) -rf $(TARGET_DIR)/usr/share/vim/vim*/doc
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
next prev parent reply other threads:[~2016-12-05 12:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-05 11:16 [Buildroot] [PATCH] vim: be more careful when removing the documentation Thomas Petazzoni
[not found] ` <CAEGTJuPZKHuu5qd9gK-GyhPkxXdV+X0+V6RAvdX_rmJ5h4vPMg@mail.gmail.com>
2016-12-05 12:09 ` Thomas Petazzoni [this message]
2016-12-05 12:14 ` Mateusz Furdyna
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161205130930.62ccc373@free-electrons.com \
--to=thomas.petazzoni@free-electrons.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox