From 1d0dcbacc1a30257628e4b55292c3004f4a9f066 Mon Sep 17 00:00:00 2001 From: "Rob Swindell (on Debian Linux)" <rob@synchro.net> Date: Fri, 5 Apr 2024 21:19:14 -0700 Subject: [PATCH] Add support for -v (verbose) option Displays messages about non-existing files when in verbose mode --- exec/cleanup.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/exec/cleanup.js b/exec/cleanup.js index c2adb4071b..ee3d1d602f 100644 --- a/exec/cleanup.js +++ b/exec/cleanup.js @@ -3,6 +3,7 @@ "use strict"; const quiet = argv.indexOf("-q") >= 0; +const verbose = argv.indexOf("-v") >= 0; function cont(str) { @@ -62,7 +63,7 @@ for(var i in file_list) { var path = item.dir + item.file; var count = directory(path).length; if(count < 1) { - if(!quiet) print(path + format(" (%s)", item.desc) + " does not exist"); + if(verbose) print(path + format(" (%s)", item.desc) + " does not exist"); continue; } var multi = count > 1 ? format(" (%u files)", count) : ""; -- GitLab