Skip to content
Snippets Groups Projects
Commit b18c66fa authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Add -dir=<code> option to manually specify multiple directories

As requested by Nelgin.

And this option is mutually exclusive with the [dir-code] parameter.
parent 5f89c517
No related branches found
No related tags found
No related merge requests found
......@@ -52,6 +52,7 @@ for(var i = 0; i < argc; i++) {
writeln(" -all add files in all libraries/directories (implies -auto)");
writeln(" -lib=<name> add files in all directories of specified library (implies -auto)");
writeln(" -auto add files only to directories that have Auto-ADDFILES enabled");
writeln(" -dir=<code> add files in directory (can be specified multiple times)");
writeln(" -from=<name> specify uploader's user name (may require quotes)");
writeln(" -file=<name> specify files to add (wildcards supported, default: *)");
writeln(" -ex=<filename> add to excluded filename list");
......@@ -87,6 +88,10 @@ for(var i = 0; i < argc; i++) {
options.auto = true;
continue;
}
if(opt.indexOf("dir=") == 0) {
dir_list.push(opt.slice(4));
continue;
}
if(opt.indexOf("file=") == 0) {
include = opt.slice(5);
continue;
......@@ -208,7 +213,6 @@ for(var d = 0; d < dir_list.length; d++) {
}
file_list = file_list.filter(function(obj) { return wildmatch(obj.name, include); });
for(var i = 0; i < file_list.length; i++) {
var file = file_list[i];
file.from = uploader;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment