Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH V5 3/3] i.MX: use temp directory for Freescale self-extractors
Date: Fri, 14 Feb 2014 09:25:04 +0100	[thread overview]
Message-ID: <20140214092504.63c32cfc@skate> (raw)
In-Reply-To: <1392337580-16568-4-git-send-email-eric.nelson@boundarydevices.com>

Dear Eric Nelson,

On Thu, 13 Feb 2014 17:26:20 -0700, Eric Nelson wrote:

> +		sh $(DL_DIR)/$(GPU_VIV_BIN_MX6Q_SOURCE) --force --auto-accept ; \
> +		mv $(GPU_VIV_BIN_MX6Q_EXTRACT)/* ./ ; \
> +		rm -rf $(GPU_VIV_BIN_MX6Q_EXTRACT)/)

I must say I would prefer if there was no slash at the end here, so
that if the GPU_VIV_BIN_MX6Q_EXTRACT variable is empty (for example due
to a bug in the package, or due to changes being made to the package
that make it non-working) it doesn't do a rm -rf /.

I'd go even further: if the directory is empty, then is a simple
"rmdir" should do the trick, and is a lot less disastrous than a "rm
-rf" should something go wrong with the argument that is passed.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  reply	other threads:[~2014-02-14  8:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-14  0:26 [Buildroot] [PATCH V5 0/3] i.MX: Updates to Freescale acceleration Eric Nelson
2014-02-14  0:26 ` [Buildroot] [PATCH V5 1/3] i.MX: Use FREESCALE_IMX_SITE for Freescale packages Eric Nelson
2014-02-14 20:16   ` Peter Korsgaard
2014-02-14  0:26 ` [Buildroot] [PATCH V5 2/3] i.MX: Update versions to match latest Freescale release Eric Nelson
2014-02-14 20:19   ` Peter Korsgaard
2014-02-14  0:26 ` [Buildroot] [PATCH V5 3/3] i.MX: use temp directory for Freescale self-extractors Eric Nelson
2014-02-14  8:25   ` Thomas Petazzoni [this message]
2014-02-14 15:18     ` Eric Nelson
2014-02-14 19:03   ` Yann E. MORIN
2014-02-14 20:11     ` Eric Nelson
2014-02-14 20:20       ` Peter Korsgaard

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=20140214092504.63c32cfc@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