On Tue, Jul 27, 2010 at 9:12 AM, Allan McRae email@example.com wrote:
Just to be clear, makepkg does not use getopt due to portability issue. It uses its own bash implementation instead. Also, repo-add uses a case statement.
Not saying which is the best way forward in this case, but something to think about.
The way that pacman-key expects its parameters is based on apt-key, but I don't know if it is the best way for Arch.
Currently, it expects two optional global parameters (configuration file and gpg home dir). After that, it expects only one "command" (an operation over pacman's keyring) and its parameters per call.
Is it better to change it to allow multiple commands (I mean, in the same script call, adding keys and removing or listing, for example)? It is not the way gpg works, for example. If the second way is better, getopt can be of help. But if the current style is preferred, I think getopt would not enforce the restriction of one operation per script call. Am I wrong?
I can make it either way, just did it like that so we could start discussing.