From: Grant Edwards <grant.b.edwards@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] Customize package not copy .svn .git etc?
Date: Tue, 7 Feb 2012 17:12:17 +0000 (UTC) [thread overview]
Message-ID: <jgrm1h$3h3$1@dough.gmane.org> (raw)
In-Reply-To: jgrkfd$m8n$1@dough.gmane.org
On 2012-02-07, Grant Edwards <grant.b.edwards@gmail.com> wrote:
>[...]
>
> I don't really understand the purpose of the "cd" command and the
> "series" file. Isn't this the same thing?
>
> $(BUILD_DIR)/.customize:
> for f in $$(ls -d $(CUST_DIR)/*); do cp -af $$f $(TARGET_DIR); done
> touch $@
Or, now that I think about it, how about the even simpler:
$(BUILD_DIR)/.customize:
cp -af $$(ls -d $(CUST_DIR)/*) $(TARGET_DIR)
touch $@
The only difference is that the last one will produce an error and the
build will fail if $CUST_DIR is empty -- which wouldn't bother me at
all, but maybe there are others who enable the customize package but
don't give it any files to copy.
One option is to delete the unwanted files after the copy:
$(BUILD_DIR)/.customize:
cp -af $$(ls -d $(CUST_DIR)/*) $(TARGET_DIR)
rm -rf $$(find $(TARGET_DIR) -type d -name .svn)
touch $@
The other obvious choice would be to use tar:
$(BUILD_DIR)/.customize:
tar -c -f - -C $(CUST_DIR) --exclude-vcs --exclude-backup . | tar -x -f - -C $(TARGET_DIR)
touch $@
I'd be happy to submit a patch containing the latter if everybody
agrees that they don't want vcs files, backup files, and lockfiles
copied. It is specific to gnu tar -- I assume that's not a problem?
--
Grant Edwards grant.b.edwards Yow! The PILLSBURY DOUGHBOY
at is CRYING for an END to
gmail.com BURT REYNOLDS movies!!
next prev parent reply other threads:[~2012-02-07 17:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-07 16:45 [Buildroot] Customize package not copy .svn .git etc? Grant Edwards
2012-02-07 17:08 ` Luca Ceresoli
2012-02-07 17:54 ` Grant Edwards
2012-02-07 17:12 ` Grant Edwards [this message]
2012-02-07 19:53 ` Arnout Vandecappelle
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='jgrm1h$3h3$1@dough.gmane.org' \
--to=grant.b.edwards@gmail.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