summaryrefslogtreecommitdiffstats
path: root/contrib/bacman.in
diff options
context:
space:
mode:
authorJakob Gruber <jakob.gruber@gmail.com>2010-10-08 22:34:17 +0200
committerDan McGee <dan@archlinux.org>2010-10-12 03:57:26 +0200
commit827258f32ee898ed5422bc9219d9a42bd9bd2360 (patch)
treeaf282868e81343ecf5a859b3084e13d1a1a7eda0 /contrib/bacman.in
parent0ff2a9149711b9179d288f579c792890cd81d79b (diff)
downloadpacman-827258f32ee898ed5422bc9219d9a42bd9bd2360.tar.gz
pacman-827258f32ee898ed5422bc9219d9a42bd9bd2360.tar.xz
CLI args: reorganize parsing
Split parsing of CLI arguments into separate functions: parsearg_op (operations) parsearg_global (global options) parsearg_{database,query,remove,sync,deptest,upgrade} Organization strictly follows the manpage (even where the manpage is incorrect) - these cases will be fixed in the following commits. Switch cases are copy/pasted and statements unrelated to chosen operation are deleted. Parsing logic adjusted as follows: 1) Parse operation 2) If we can bail out early (duplicate op, help/version requested) do so 3) Parse arguments again: foreach arg: if arg is operation: continue tryparse_args_specific_to_op if unsuccessful tryparse_args_global if unsuccessful print error message and exit Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'contrib/bacman.in')
0 files changed, 0 insertions, 0 deletions