From: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
To: "Maupin, Chase" <chase.maupin@ti.com>
Cc: "openembedded-devel@lists.openembedded.org"
<openembedded-devel@lists.openembedded.org>
Subject: Re: [PATCH 1/1] distribute_license: added class to copy license files
Date: Fri, 30 Jul 2010 09:57:31 +0200 [thread overview]
Message-ID: <20100730075731.GD12277@mx.loc> (raw)
In-Reply-To: <131E5DFBE7373E4C8D813795A6AA7F0802E9149617@dlee06.ent.ti.com>
On Thu, Jul 29, 2010 at 04:46:55PM -0500, Maupin, Chase wrote:
>> >+ set -f
>>
>> hush: set: -f: invalid option
>
>I thought bash was the standard shell for working with OE. Is that wrong?
You're right, it is (and -f is a mandatory flag so disregard this,
sorry)
>> >+ res=`find . -maxdepth ${LICENSE_SEARCH_DEPTH} -name "$lic"`
>> >+ if [ "$res" != "" ]
>>
>> breaks on older test(1) impls that don't handle empty strings properly.
>> Could be that this one is moot by now though.
>
>So did this break for you? I've never seen this issue.
[ -n "$res" ]
>
>>
>> >+ then
>> >+ mkdir -p ${DEPLOY_DIR}/licenses/${PN}
>> >+ cp $res ${DEPLOY_DIR}/licenses/${PN}
>>
>> install -D ${DEPLOY_DIR}/licenses/${PN} ${DEPLOY_DIR}/licenses/${PN}
>
>I'll change this
typo of mine: the first non-option argument should have been $res, of
course.
essentially you mean (if you say it in sh)
set -f
for lic in ${LICENSE_FILES}
do
find ${S} -maxdepth ${LICENSE_SEARCH_DEPTH} -name "$lic" | \
while read f
do
bn=$(basename $f)
if [ -r ${DEPLOY_DIR}/licenses/${PN}/$bn ]; then
# we could have used $d.$bn for per-dir licenses
# d=$(echo $f | sed -e "s|${S}||" -e normalize-and-convert-slashes-to-underscore)
echo "ERROR: possibly conflicting licenses"
exit 1
fi
install -D $f ${DEPLOY_DIR}/licenses/${PN}/$bn
done
done
set +f
This leaves you with just one non-standard hunk: -maxdepth
Given that both findutils as well as busybox support -maxdepth i would
not bother much.
Just a thought.. your initial version may be sufficient for most
practical reasons.
cheers,
next prev parent reply other threads:[~2010-07-30 7:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-29 14:51 [PATCH 1/1] distribute_license: added class to copy license files Chase Maupin
2010-07-29 20:55 ` Bernhard Reutner-Fischer
2010-07-29 21:46 ` Maupin, Chase
2010-07-30 7:57 ` Bernhard Reutner-Fischer [this message]
2010-07-30 8:10 ` David Kozub
2010-07-30 6:48 ` Koen Kooi
2010-08-02 14:11 ` Marc Olzheim
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=20100730075731.GD12277@mx.loc \
--to=rep.dot.nop@gmail.com \
--cc=chase.maupin@ti.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.