[OE-core] [PATCH] wipe-sysroot: explain what is being deleted and require confirmation

Phil Blundell pb at pbcl.net
Sat Nov 2 16:19:34 UTC 2013


On Fri, 2013-11-01 at 23:21 +0000, Burton, Ross wrote:
> On 1 November 2013 21:04, Phil Blundell <pb at pbcl.net> wrote:
> > On Fri, 2013-11-01 at 19:47 +0000, Ross Burton wrote:
> >> Instead of rushing into deleting entire directory trees without any warning,
> >> print the directories and files that will be deleted and require confirmation
> >> from the user (via --force) that they want files to be deleted.
> >
> > "--force" seems like a bit of an odd name for an argument that you have
> > to supply in order for the script to do anything useful.  Why would the
> > user be running a script named "wipe-sysroot" if they didn't want the
> > sysroot to be deleted?
> 
> I'm open to alternative wording but the essence is "don't delete stuff
> if the user does something like wipe-sysroot --help".

How about:

if [ $# -gt 0 ]; then
  echo "Usage: $0" >&2
  exit 1
fi

p.





More information about the Openembedded-core mailing list