From bf6c0d0808b48bbcaf4dbc76669081cbb548eaea Mon Sep 17 00:00:00 2001
From: Rob Swindell <rob@synchro.net>
Date: Sat, 1 Jan 2022 20:58:51 -0800
Subject: [PATCH] Add a force option that's currently only enabled. <shrug>

Not sure what I was doing here, but might as well have it committed.
---
 exec/updatefiles.js | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/exec/updatefiles.js b/exec/updatefiles.js
index 4eb370ec38..e92bbcdab7 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] + "]");
-- 
GitLab