diff --git a/exec/updatefiles.js b/exec/updatefiles.js index 4eb370ec3805f0523bcdda69855bf5076e375f6e..e92bbcdab7c862da591864051daa0ca0cb019173 100755 --- a/exec/updatefiles.js +++ b/exec/updatefiles.js @@ -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] + "]");