Skip to content

Commit

Permalink
Add NoConfirm config file option
Browse files Browse the repository at this point in the history
  • Loading branch information
Tadeusz Sośnierz committed Aug 10, 2011
1 parent 864fc5d commit bc03c64
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions conf.c
Expand Up @@ -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);
}
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions powaur.conf
Expand Up @@ -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.