summaryrefslogtreecommitdiff
path: root/src/apk.c
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2009-07-24 14:18:07 +0300
committerTimo Teras <timo.teras@iki.fi>2009-07-24 14:18:45 +0300
commit1c92602172790bbcb75f6083cf53ce7fea25b33a (patch)
tree03e607086477a15fe9e6500cba428d8e369ae700 /src/apk.c
parent195859b3fd35819b218336f0bdd87eaa55778d56 (diff)
downloadapk-tools-1c92602172790bbcb75f6083cf53ce7fea25b33a.tar.gz
apk-tools-1c92602172790bbcb75f6083cf53ce7fea25b33a.tar.bz2
apk-tools-1c92602172790bbcb75f6083cf53ce7fea25b33a.tar.xz
apk-tools-1c92602172790bbcb75f6083cf53ce7fea25b33a.zip
apk: add -i/--interactive option (fixes #60)
and use that to figure if questions are allowed or not instead of the verbosity level.
Diffstat (limited to 'src/apk.c')
-rw-r--r--src/apk.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/apk.c b/src/apk.c
index 1783eea..a21427f 100644
--- a/src/apk.c
+++ b/src/apk.c
@@ -37,6 +37,7 @@ static struct apk_option generic_options[] = {
required_argument, "REPO" },
{ 'q', "quiet", "Print less information" },
{ 'v', "verbose", "Print more information" },
+ { 'i', "interactive", "Ask confirmation for certain operations" },
{ 'V', "version", "Print program version and exit" },
{ 'f', "force", "Do what was asked even if it looks dangerous" },
{ 'U', "update-cache", "Update the repository cache" },
@@ -348,6 +349,9 @@ int main(int argc, char **argv)
case 'f':
apk_flags |= APK_FORCE;
break;
+ case 'i':
+ apk_flags |= APK_INTERACTIVE;
+ break;
case 'U':
apk_flags |= APK_UPDATE_CACHE;
break;