mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2024-11-17 20:12:11 +01:00
scripts/config: add an option for making the conf tool write to a different file
SVN-Revision: 25230
This commit is contained in:
parent
3810bdf320
commit
b0f60f8023
@ -508,9 +508,10 @@ int main(int ac, char **av)
|
|||||||
{
|
{
|
||||||
int i = 1;
|
int i = 1;
|
||||||
const char *name;
|
const char *name;
|
||||||
|
char *output = NULL;
|
||||||
struct stat tmpstat;
|
struct stat tmpstat;
|
||||||
|
|
||||||
if (ac > i && av[i][0] == '-') {
|
while (ac > i && av[i][0] == '-') {
|
||||||
switch (av[i++][1]) {
|
switch (av[i++][1]) {
|
||||||
case 'o':
|
case 'o':
|
||||||
input_mode = ask_new;
|
input_mode = ask_new;
|
||||||
@ -531,6 +532,9 @@ int main(int ac, char **av)
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 'w':
|
||||||
|
output = av[i++];
|
||||||
|
break;
|
||||||
case 'n':
|
case 'n':
|
||||||
input_mode = set_no;
|
input_mode = set_no;
|
||||||
break;
|
break;
|
||||||
@ -601,7 +605,7 @@ int main(int ac, char **av)
|
|||||||
conf_cnt = 0;
|
conf_cnt = 0;
|
||||||
check_conf(&rootmenu);
|
check_conf(&rootmenu);
|
||||||
} while (conf_cnt);
|
} while (conf_cnt);
|
||||||
if (conf_write(NULL)) {
|
if (conf_write(output)) {
|
||||||
fprintf(stderr, _("\n*** Error during writing of the build configuration.\n\n"));
|
fprintf(stderr, _("\n*** Error during writing of the build configuration.\n\n"));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user