From 7a29678aac20ac9e113704f8a5743f6051edef8d Mon Sep 17 00:00:00 2001 From: Timo Teras Date: Thu, 25 Jun 2009 15:14:07 +0300 Subject: help: auto construct help And add some more verbosity to the help message. --- src/index.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/index.c') diff --git a/src/index.c b/src/index.c index 824d60e..960c42f 100644 --- a/src/index.c +++ b/src/index.c @@ -4,7 +4,7 @@ * Copyright (C) 2008 Timo Teräs * All rights reserved. * - * This program is free software; you can redistribute it and/or modify it + * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published * by the Free Software Foundation. See http://www.gnu.org/ for details. */ @@ -113,13 +113,16 @@ static int index_main(void *ctx, int argc, char **argv) return 0; } -static struct option index_options[] = { - { "delete", required_argument, NULL, 'd' }, +static struct apk_option index_options[] = { + { 'd', "delete", + "Read existing INDEXFILE and delete the listed FILEs from it", + required_argument, "INDEXFILE" }, }; static struct apk_applet apk_index = { .name = "index", - .usage = "[-d|--delete INDEXFILE] FILE...", + .help = "Create repository index file from FILEs.", + .arguments = "FILE...", .context_size = sizeof(struct index_ctx), .num_options = ARRAY_SIZE(index_options), .options = index_options, -- cgit v1.2.3-60-g2f50