Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Korsgaard <peter@korsgaard.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] fs/common.mk: support comments in user table files
Date: Fri, 16 Oct 2015 16:50:19 +0200	[thread overview]
Message-ID: <1445007019-23720-1-git-send-email-peter@korsgaard.com> (raw)

The format of the users table files is non trivial, so it is sometimes handy
to add comments explaining the syntax (or simply the reason for the user)
inline in the files.

Support comment lines prefixed with '#' similar to shell / makedevs files and strip
those lines before passing to the mkusers script.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 fs/common.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/common.mk b/fs/common.mk
index 528e194..7110bc7 100644
--- a/fs/common.mk
+++ b/fs/common.mk
@@ -87,7 +87,7 @@ endif
 	echo "$$(HOST_DIR)/usr/bin/makedevs -d $$(FULL_DEVICE_TABLE) $$(TARGET_DIR)" >> $$(FAKEROOT_SCRIPT)
 endif
 ifneq ($$(ROOTFS_USERS_TABLES),)
-	cat $$(ROOTFS_USERS_TABLES) >> $$(USERS_TABLE)
+	sed '/^#/d' $$(ROOTFS_USERS_TABLES) >> $$(USERS_TABLE)
 endif
 	printf '$$(subst $$(sep),\n,$$(PACKAGES_USERS))' >> $$(USERS_TABLE)
 	PATH=$$(BR_PATH) $$(TOPDIR)/support/scripts/mkusers $$(USERS_TABLE) $$(TARGET_DIR) >> $$(FAKEROOT_SCRIPT)
-- 
2.1.4

             reply	other threads:[~2015-10-16 14:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-16 14:50 Peter Korsgaard [this message]
2015-10-16 15:01 ` [Buildroot] [PATCH] fs/common.mk: support comments in user table files Thomas Petazzoni
2015-10-16 15:10   ` Peter Korsgaard
2015-10-16 16:30     ` Yann E. MORIN
2015-10-17 14:34 ` Yann E. MORIN
2015-10-17 20:22   ` Peter Korsgaard
2015-10-18 15:57 ` Thomas Petazzoni

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=1445007019-23720-1-git-send-email-peter@korsgaard.com \
    --to=peter@korsgaard.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