Browse files

Add NoConfirm config file option

  • Loading branch information...
1 parent 864fc5d commit bc03c64ad6fbc63cdf40ae1dc2d9f959fc124619 @tadzik committed Aug 10, 2011
Showing with 10 additions and 0 deletions.
  1. +8 −0 conf.c
  2. +2 −0 powaur.conf
View
8 conf.c
@@ -100,6 +100,14 @@ void parse_powaur_config(FILE *fp)
++config->color;
pw_printf(PW_LOG_DEBUG, "%s%sParsed Color = On\n", TAB, TAB);
}
+ } else if (!strcmp(key, "NoConfirm")) {
+ if (!strcmp(val, "Off") && config->noconfirm > 0) {
+ --config->noconfirm;
+ pw_printf(PW_LOG_DEBUG, "%s%sParsed NoConfirm = Off\n", TAB, TAB);
+ } else if (!strcmp(val, "On")) {
+ ++config->noconfirm;
+ pw_printf(PW_LOG_DEBUG, "%s%sParsed NoConfirm = On\n", TAB, TAB);
+ }
}
}
}
View
2 powaur.conf
@@ -10,8 +10,10 @@
# TmpDir (where to download temporary packages, default = /tmp/powaur-username)
# MaxThreads (maximum no. of threads to spawn for downloading, max of 10)
# Color (Controls colorized output)
+# NoConfirm (whether to skip asking for confirmation)
Editor = vim
#TmpDir = /tmp/powaur/
MaxThreads = 10
Color = On
+#NoConfirm = Off

0 comments on commit bc03c64

Please sign in to comment.