Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-dev
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-dev@g.o
From: Michał Górny <mgorny@g.o>
Subject: Re: [PATCH eutils] Move remove_libtool_files() from autotools-utils for wider use.
Date: Thu, 31 May 2012 13:40:01 +0200
On Thu, 31 May 2012 02:09:11 -0400
Mike Frysinger <vapier@g.o> wrote:

> yet, if you read the actual code, you'll see:
> +	[[ ${#} -le 1 ]] || die "Invalid number of args to
> ${FUNCNAME}()"
> +	if [[ ${#} -eq 1 ]]; then
> +	...
> +	fi
> 
> that means if more than 1 argument is passed, no error is thrown.

The exact opposite. If more than a single argument is passed, error is
thrown.

> thought you were intending to parse $@ further on because of it
> (hence the suggestion of updating the @USAGE), but it looks merely
> like your arg parsing is incorrect and needs fixing.  probably
> easiest by doing: case $#:$1 in
> 	0:'') ;;
> 	1:all) removing_all=1 ;;
> 	*) die "invalid usage" ;;
> 	esac

Just a little reverse logic in spirit of makefiles. But the case
variant would be probably more readable indeed.

-- 
Best regards,
Michał Górny
Attachment:
signature.asc (PGP signature)
References:
[PATCH eutils] Move remove_libtool_files() from autotools-utils for wider use.
-- Michał Górny
Re: [PATCH eutils] Move remove_libtool_files() from autotools-utils for wider use.
-- Mike Frysinger
Re: [PATCH eutils] Move remove_libtool_files() from autotools-utils for wider use.
-- Michał Górny
Re: [PATCH eutils] Move remove_libtool_files() from autotools-utils for wider use.
-- Mike Frysinger
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: [PATCH eutils] Move remove_libtool_files() from autotools-utils for wider use.
Next by thread:
[PATCH eutils] Introduce prune_libtool_files().
Previous by date:
Re: [PATCH eutils] Move remove_libtool_files() from autotools-utils for wider use.
Next by date:
Re: Re: Portage Git migration - clean cut or git-cvsserver


Updated Jun 29, 2012

Summary: Archive of the gentoo-dev mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.