pacman-key: use our option parser
commit7d205a70a26f1c3d283e995ec590b6838eb8283d
authorAllan McRae <allan@archlinux.org>
Tue, 5 Jul 2011 17:05:08 +0000 (6 03:05 +1000)
committerAllan McRae <allan@archlinux.org>
Tue, 19 Jul 2011 00:27:53 +0000 (19 10:27 +1000)
tree5ba324e4172e7cca84726121b42cd5c743188279
parentdad96ccce2eea8b171cd2d14ec20b8185f0009a8
pacman-key: use our option parser

The pacman-key script is complicated enough to warrent usage of the
parse_options script.  This is especially helpful in dealing with
all the configuration file override flags as the no longer need to
be specified first.  It also allows us to do the right thing early
with --help/--version and no option cases cleanly. This change also
makde the check for root privileges only occur on operations where
they are needed.

This patch is inspired by and supercedes some patches submitted by
Denis A. AltoĆ© Falqueto and Ivan Kanakarakis who were altering the
previous option handling in an attempt to deal with the above issues.

Signed-off-by: Allan McRae <allan@archlinux.org>
scripts/pacman-key.sh.in