All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Larson <kergoth@gmail.com>
To: openembedded-devel@lists.openembedded.org
Cc: Chris Larson <chris_larson@mentor.com>
Subject: [PATCH 4/4] bin/install: implement -D internally
Date: Tue, 18 Jan 2011 08:18:49 -0700	[thread overview]
Message-ID: <1295363929-13246-4-git-send-email-kergoth@gmail.com> (raw)
In-Reply-To: <1295363929-13246-1-git-send-email-kergoth@gmail.com>

From: Chris Larson <chris_larson@mentor.com>

Signed-off-by: Chris Larson <chris_larson@mentor.com>
---
 bin/install |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/bin/install b/bin/install
index 4ad8172..1c938755 100755
--- a/bin/install
+++ b/bin/install
@@ -1,9 +1,13 @@
 #!/bin/sh
+#
+# Portability notes:
+# - We allow what SuSv3 defines
+# - We implement -D internally
 
 source $(dirname $0)/wrapper.sh
 
 saved=""
-while getopts dbCcMpSsvB:f:g:m:o: opt; do
+while getopts dbCcMpSsvB:f:g:m:o:D opt; do
     case "$opt" in
         s)
             # Ignore strip argument
@@ -12,6 +16,9 @@ while getopts dbCcMpSsvB:f:g:m:o: opt; do
             save "-$opt"
             save "$OPTARG"
             ;;
+        D)
+            createleading="1"
+            ;;
         \?)
             exit 1
             ;;
@@ -25,4 +32,8 @@ for arg; do
     save "$arg"
 done
 
+if [ $# == 2 -a -n "$createleading" ]; then
+    install -d $(dirname $2)
+fi
+
 exec_real
-- 
1.7.2.3




  parent reply	other threads:[~2011-01-18 15:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-18 15:18 [PATCH 1/4] bitbake.conf: include bin dirs from BBPATH in PATH Chris Larson
2011-01-18 15:18 ` [PATCH 2/4] Move stage-manager-* into bin/ rather than a recipe Chris Larson
2011-01-18 20:35   ` Khem Raj
2011-01-26 19:31   ` Eric Bénard
2011-01-18 15:18 ` [PATCH 3/4] Add install wrapper rather than coreutils-native Chris Larson
2011-01-18 20:36   ` Khem Raj
2011-01-26 19:31   ` Eric Bénard
2011-01-18 15:18 ` Chris Larson [this message]
2011-01-18 16:55   ` [PATCH 4/4] bin/install: implement -D internally Tom Rini
2011-01-18 20:37   ` Khem Raj
2011-01-26 19:31   ` Eric Bénard
2011-01-26 20:26   ` Bernhard Reutner-Fischer
2011-01-18 20:35 ` [PATCH 1/4] bitbake.conf: include bin dirs from BBPATH in PATH Khem Raj
2011-01-26 19:31 ` Eric Bénard

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=1295363929-13246-4-git-send-email-kergoth@gmail.com \
    --to=kergoth@gmail.com \
    --cc=chris_larson@mentor.com \
    --cc=openembedded-devel@lists.openembedded.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.