From: Artem Bityutskiy <dedekind1@gmail.com>
To: Mike Frysinger <vapier.adi@gmail.com>
Cc: Brian Norris <computersforpeace@gmail.com>,
David Woodhouse <dwmw2@infradead.org>,
linux-mtd@lists.infradead.org,
Kevin Cernekee <cernekee@gmail.com>
Subject: Re: [PATCH 0/2] small mtd-utils fixes
Date: Wed, 23 Nov 2011 09:45:17 +0200 [thread overview]
Message-ID: <1322034324.24797.230.camel@sauron.fi.intel.com> (raw)
In-Reply-To: <CAMjpGUdxGfo7dfSNhzQUHg3QGkKW7rQewiFhDjGyJ0TjjQkdkA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1420 bytes --]
On Tue, 2011-11-22 at 17:21 -0500, Mike Frysinger wrote:
> On Tue, Nov 22, 2011 at 16:38, Artem Bityutskiy wrote:
> > On Sun, 2011-11-20 at 23:22 -0500, Mike Frysinger wrote:
> >> On Sun, Nov 20, 2011 at 08:08, Artem Bityutskiy wrote:
> >> > usage() {
> >> > cat <<EOF
> >> > Usage: ${0##*/} <new_ver> <outdir>
> >> >
> >> > <new_ver> - mtd utils version to create in X.Y.Z format
> >> > <outdir> - the output directory where to store the tarball with the
> >> > gpg signature
> >> > EOF
> >> > exit 0
> >> > }
> >>
> >> i'd have outdir be optional and default to $PWD
> >
> > Yeah, but this would require me to add options handling using getopt,
> > because optional parameters have to have an option. I just do not feel
> > it is necessary right now. This can be done at any point if someone
> > needs.
>
> i don't think so
>
> case $# in
> 0) usage ;;
> 1|2) ;;
> *) fatal "Insufficient or too many argumetns" ;;
> esac
>
> new_ver="$1"; shift
> outdir="${1:-.}"; shift
I did not mean it is technincally impossible, I meant that it is just
normal Unix rule which I want to stick with, at least in simple cases:
1. Non-mandatory arguments come with options like -x <blah>
2. Mandatory arguments come come without options.
utility < -x blah and other optional stuff> <arg1> <other mandatory
args>
--
Best Regards,
Artem Bityutskiy
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2011-11-23 7:44 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-16 20:03 [PATCH 0/2] small mtd-utils fixes Brian Norris
2011-11-16 20:03 ` [PATCH 1/2] mtd-utils: add jffs2reader to .gitignore Brian Norris
2011-11-17 5:40 ` Mike Frysinger
2011-11-16 20:03 ` [PATCH 2/2] mtdinfo: provide info when used without arguments Brian Norris
2011-11-17 5:41 ` Mike Frysinger
2011-11-17 22:19 ` [PATCH 0/2] small mtd-utils fixes Artem Bityutskiy
2011-11-17 23:56 ` Brian Norris
2011-11-18 22:00 ` Artem Bityutskiy
2011-11-18 22:44 ` Peter Korsgaard
2011-11-18 23:37 ` Brian Norris
2011-11-19 20:47 ` Artem Bityutskiy
2011-11-19 20:55 ` Mike Frysinger
2011-11-19 23:04 ` Artem Bityutskiy
2011-11-20 8:41 ` Mike Frysinger
2011-11-20 13:10 ` Artem Bityutskiy
2011-11-20 11:55 ` David Woodhouse
2011-11-20 13:08 ` Artem Bityutskiy
2011-11-21 4:22 ` Mike Frysinger
2011-11-22 21:38 ` Artem Bityutskiy
2011-11-22 22:21 ` Mike Frysinger
2011-11-23 7:45 ` Artem Bityutskiy [this message]
2011-11-24 1:45 ` Mike Frysinger
2011-11-24 7:26 ` Artem Bityutskiy
2011-12-05 0:28 ` Mike Frysinger
2011-12-07 7:12 ` Artem Bityutskiy
2011-11-23 9:38 ` Artem Bityutskiy
2011-11-22 22:21 ` Mike Frysinger
2011-11-23 9:39 ` Artem Bityutskiy
2011-11-17 22:22 ` Artem Bityutskiy
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=1322034324.24797.230.camel@sauron.fi.intel.com \
--to=dedekind1@gmail.com \
--cc=cernekee@gmail.com \
--cc=computersforpeace@gmail.com \
--cc=dwmw2@infradead.org \
--cc=linux-mtd@lists.infradead.org \
--cc=vapier.adi@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).