[pacman-dev] [PATCH] makepkg : switch from getopt to getopts builtin

Alessio Bolognino themolok.ml at gmail.com
Mon Jun 2 11:11:22 EDT 2008


On Mon 2008-06-02 11:54, Xavier wrote:
> >From f5c5a277e2df14650ae441f32950aa6d4deee50f Mon Sep 17 00:00:00 2001
> From: Xavier Chantry <shiningxc at gmail.com>
> Date: Wed, 28 May 2008 21:57:28 +0200
> Subject: [PATCH] makepkg : switch from getopt to getopts builtin
> 
> getopt is an external script for parsing and is less portable than getopts
> which is a bash builtin.
> The main problem is that it only supports short opts, so long opts had to be
> dropped.
> The benefits are a much better portability and a simpler code for the
> arguments parsing.

Maybe dropping all long options is not a great idea: makepkg has a lot
of options and find an alphanumeric character for each is not that
easy/intuitive; Furthermore getopt is ported virtually everywhere: Mac
OS X, FreeBSD, OpenBSD, NetBSD etc. and stuff like asciidoc
depends upon it.

Bear in mind I don't have a strong opinion about that, I was just
playing devil's advocate :)

-- 
Alessio (molok) Bolognino

Please send personal email to themolok at gmail.com

Public Key http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xFE0270FB
GPG Key ID = 1024D / FE0270FB 2007-04-11
Key Fingerprint = 9AF8 9011 F271 450D 59CF  2D7D 96C9 8F2A FE02 70FB
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
URL: <http://archlinux.org/pipermail/pacman-dev/attachments/20080602/c991470a/attachment.pgp>


More information about the pacman-dev mailing list