Commit bf6c0d08 authored by Rob Swindell's avatar Rob Swindell 💬
Browse files

Add a force option that's currently only enabled. <shrug>

Not sure what I was doing here, but might as well have it committed.
parent 52faf14f
......@@ -2,6 +2,7 @@ if(argc < 1) {
alert("No directory code specfiied");
exit(0);
}
var options = { force: true };
var fbase = new FileBase(argv[0]);
if(!fbase.open()) {
alert("failed to open base");
......@@ -10,6 +11,11 @@ if(!fbase.open()) {
var file_list = fbase.get_list(argv[1] || "*", FileBase.DETAIL.NORM);
for(var i in file_list) {
var file = file_list[i];
if(options.force) {
print("Updating " + file.name);
fbase.update(file.name, file, /* use_diz_always: */true, /* re-add: */true);
continue;
}
var copy = JSON.parse(JSON.stringify(file));
for(var p in file) {
var str = prompt(p + " [" + file[p] + "]");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment