Skip to content
Snippets Groups Projects
Commit d26a61cf authored by Michael Long's avatar Michael Long
Browse files

change arg handling

parent 006ff1af
Branches
Tags
No related merge requests found
...@@ -1203,30 +1203,20 @@ function doScan() ...@@ -1203,30 +1203,20 @@ function doScan()
ucfg.save(); ucfg.save();
} }
for(i in argv) {
if (argv[0] && argv[0].length) { switch(argv[i].toLowerCase()) {
switch(argv[0].toLowerCase()) {
case 'scan': case 'scan':
doScan(); doScan();
break; break;
case 'pre': case 'pre':
if(argv[1]) runPre(argv[i+1].toLowerCase());
runPre(argv[1].toLowerCase());
else
throw("XTRN code not included on command-line!");
break; break;
case 'post': case 'post':
if(argv[1]) runPost(argv[i+1].toLowerCase());
runPost(argv[1].toLowerCase());
else
throw("XTRN code not included on command-line!");
break; break;
case 'run': case 'run':
// deprecated // deprecated
if(argv[1]) runXtrn(argv[i+1].toLowerCase());
runXtrn(argv[1].toLowerCase());
else
throw("XTRN code not included on command-line!");
break; break;
case 'config': case 'config':
new UserConfig(user.number).configure(); new UserConfig(user.number).configure();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment