summaryrefslogtreecommitdiffstats
path: root/scripts/config
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-01-29 02:22:40 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-01-29 02:22:40 +0000
commit14218d590bf39de3ffa97b2761a9934ba41ddd35 (patch)
tree8ac9e3a071956c1c3a28bba3b68851a7fc5d97a6 /scripts/config
parent2a5249437aa76e7148a9c7c7af685a4f2f60c72f (diff)
scripts/config: add an option for making the conf tool write to a different file
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@25230 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'scripts/config')
-rw-r--r--scripts/config/conf.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/config/conf.c b/scripts/config/conf.c
index 6589aee45..0a44a2edd 100644
--- a/scripts/config/conf.c
+++ b/scripts/config/conf.c
@@ -508,9 +508,10 @@ int main(int ac, char **av)
{
int i = 1;
const char *name;
+ char *output = NULL;
struct stat tmpstat;
- if (ac > i && av[i][0] == '-') {
+ while (ac > i && av[i][0] == '-') {
switch (av[i++][1]) {
case 'o':
input_mode = ask_new;
@@ -531,6 +532,9 @@ int main(int ac, char **av)
exit(1);
}
break;
+ case 'w':
+ output = av[i++];
+ break;
case 'n':
input_mode = set_no;
break;
@@ -601,7 +605,7 @@ int main(int ac, char **av)
conf_cnt = 0;
check_conf(&rootmenu);
} while (conf_cnt);
- if (conf_write(NULL)) {
+ if (conf_write(output)) {
fprintf(stderr, _("\n*** Error during writing of the build configuration.\n\n"));
return 1;
}