On 2010-06-12, 16:50 +0800, Ameya Palande wrote:
> > > -options=$(getopt -o qvd:F: --long quilt,symbol:,dir:,fuzz: -- "$@")
> > > +options=$(getopt -o :vd:F:q --long verbose,dir:,fuzz:,quilt -- "$@")
> >                        ^ do we need the leading ':'?
> 
> With leading ':'
> -------------------------
> am...@chotu:~/repos/kernel-source$ ./scripts/sequence-patch.sh --test
> Usage: sequence-patch.sh [OPTION]
> -------------------------

What is the return value, i.e.: $?

> Without leading ':' we get the following getopt warning
> -------------------------
> am...@chotu:~/repos/kernel-source$ ./scripts/sequence-patch.sh --test
> getopt: unrecognized option '--test'
> Usage: sequence-patch.sh [OPTION]
> -------------------------

Is that a trick to support unsupported options? :)

But we actually don't support "--test" (or --anythingelse), right? So
when you specify the "--test", the right behaviour is give a warning,
and return value (i.e.: $?) is none-zero. Otherwise we break that
semantic. NO?
_______________________________________________
MeeGo-dev mailing list
[email protected]
http://lists.meego.com/listinfo/meego-dev

Reply via email to