summaryrefslogtreecommitdiff
path: root/src/apk.c
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-01-16 09:33:55 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-01-16 09:33:55 +0000
commit50daa05773a66fc94fd459011f51544b8b6e0517 (patch)
treedc9e320fd4e46923f5d8951a7e652d56e8dcec33 /src/apk.c
parentaf6f329fc72bd93d2ac1a07ce6b23e510cf82ea8 (diff)
downloadapk-tools-50daa05773a66fc94fd459011f51544b8b6e0517.tar.gz
apk-tools-50daa05773a66fc94fd459011f51544b8b6e0517.tar.bz2
apk-tools-50daa05773a66fc94fd459011f51544b8b6e0517.tar.xz
apk-tools-50daa05773a66fc94fd459011f51544b8b6e0517.zip
info: only show package desc when --verbose
also introduce apk_verbosity. --quiet reduce verbosity and --verbose increases it. Default verbosity is 1.
Diffstat (limited to 'src/apk.c')
-rw-r--r--src/apk.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/apk.c b/src/apk.c
index 2a8c959..8040dd9 100644
--- a/src/apk.c
+++ b/src/apk.c
@@ -23,7 +23,7 @@
const char *apk_root;
const char *apk_repository = NULL;
-int apk_quiet = 0, apk_progress = 0;
+int apk_verbosity = 1, apk_progress = 0;
int apk_cwd_fd;
void apk_log(const char *prefix, const char *format, ...)
@@ -95,11 +95,12 @@ static struct apk_applet *deduce_applet(int argc, char **argv)
return NULL;
}
-#define NUM_GENERIC_OPTS 4
+#define NUM_GENERIC_OPTS 5
static struct option generic_options[32] = {
{ "root", required_argument, NULL, 'Q' },
{ "repository", required_argument, NULL, 'X' },
{ "quiet", no_argument, NULL, 'q' },
+ { "verbose", no_argument, NULL, 'v' },
{ "progress", no_argument, NULL, 0x100 },
};
@@ -148,7 +149,10 @@ int main(int argc, char **argv)
apk_repository = optarg;
break;
case 'q':
- apk_quiet = 1;
+ apk_verbosity--;
+ break;
+ case 'v':
+ apk_verbosity++;
break;
case 0x100:
apk_progress = 1;