From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 1/2] infra: Add generic check_prog_host function
Date: Sun, 23 Feb 2014 18:40:32 +0100 [thread overview]
Message-ID: <20140223184032.2c6d08de@skate> (raw)
In-Reply-To: <1393172261-17421-1-git-send-email-maxime.hadjinlian@gmail.com>
Dear Maxime Hadjinlian,
On Sun, 23 Feb 2014 17:17:40 +0100, Maxime Hadjinlian wrote:
> +# Verify that which is installed
> +check_prog_host "which"
Since your function check_prog_host uses which to determine if the
program exists, isn't it weird to use which to verify it?
Your check_host_prog function could also be used in:
# Check that a few mandatory programs are installed
missing_progs="no"
for prog in patch perl tar wget cpio python unzip rsync bc ${DL_TOOLS} ; do
if ! which $prog > /dev/null ; then
echo "You must install '$prog' on your build machine";
missing_progs="yes"
if test $prog = "svn" ; then
echo " svn is usually part of the subversion package in your distribution"
elif test $prog = "hg" ; then
echo " hg is usually part of the mercurial package in your distribution"
elif test $prog = "zcat" ; then
echo " zcat is usually part of the gzip package in your distribution"
elif test $prog = "bzcat" ; then
echo " bzcat is usually part of the bzip2 package in your distribution"
fi
fi
done
if test "${missing_progs}" = "yes" ; then
exit 1
fi
Though you see that this loop has this missing_progs variable that
allows to list all the missing programs, and only abort at the end.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
next prev parent reply other threads:[~2014-02-23 17:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-23 16:17 [Buildroot] [PATCH v2 1/2] infra: Add generic check_prog_host function Maxime Hadjinlian
2014-02-23 16:17 ` [Buildroot] [PATCH v2 2/2] classpath: Use generic check for host program Maxime Hadjinlian
2014-02-23 17:40 ` Thomas Petazzoni [this message]
2014-02-23 18:12 ` [Buildroot] [PATCH v2 1/2] infra: Add generic check_prog_host function Maxime Hadjinlian
2014-03-28 18:41 ` Maxime Hadjinlian
2014-05-02 12:20 ` Thomas De Schampheleire
2014-05-02 12:49 ` Maxime Hadjinlian
-- strict thread matches above, loose matches on Subject: below --
2014-05-03 14:02 Maxime Hadjinlian
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=20140223184032.2c6d08de@skate \
--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