mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 3/3] hush: implement getopt builtin
Date: Fri, 8 Oct 2010 14:36:27 +0200	[thread overview]
Message-ID: <20101008123627.GC30252@game.jcrosoft.org> (raw)
In-Reply-To: <1286540674-17174-4-git-send-email-s.hauer@pengutronix.de>

On 14:24 Fri 08 Oct     , Sascha Hauer wrote:
> Positional parameters are not nice, so implement a getopt
> function. This has to be done as a builtin because otherwise
> we have no access to the parents argc/argv.
> 
> getopt works as expected, here is a little example:
> 
> while getopt "hs:" OPT
> do
>         if [ $OPT = h ]; then
>                 echo "usage"
>                 exit 1
>         else
>                 echo "scr: opt: $OPT optarg: $OPTARG"
> 	fi
> done
> 
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
how about make it optional?

Best Regards,
J.

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2010-10-08 12:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-08 12:24 Sascha Hauer
2010-10-08 12:24 ` [PATCH 1/3] hush: pass context around in shell Sascha Hauer
2010-10-08 12:24 ` [PATCH 2/3] hush: fix nasty memory leak in hush Sascha Hauer
2010-10-08 12:24 ` [PATCH 3/3] hush: implement getopt builtin Sascha Hauer
2010-10-08 12:36   ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2010-10-08 12:45     ` Sascha Hauer
2010-10-11  5:08       ` Jean-Christophe PLAGNIOL-VILLARD
2010-10-08 13:31   ` [PATCH 3/3 v2] " Sascha Hauer

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=20101008123627.GC30252@game.jcrosoft.org \
    --to=plagnioj@jcrosoft.com \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /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