[PATCH 0/2] small mtd-utils fixes
Mike Frysinger
vapier.adi at gmail.com
Tue Nov 22 17:21:05 EST 2011
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
-mike
More information about the linux-mtd
mailing list