Minor fixes to oputil

This commit is contained in:
Bryan Ashby 2017-02-20 11:46:18 -07:00
parent 0ca2ca9bf2
commit 72b0eafc7b
3 changed files with 12 additions and 7 deletions

View File

@ -280,7 +280,7 @@ function getMsgAreaImportType(path) {
function importAreas() {
const importPath = argv._[argv._.length - 1];
if(!importPath) {
if(argv._.length < 3 || !importPath || 0 === importPath.length) {
return printUsageAndSetExitCode(getHelpFor('Config'), ExitCodes.ERROR);
}

View File

@ -36,18 +36,23 @@ valid args:
`usage: optutil.js config <action> [<args>]
where <action> is one of:
new : generate a new/initial configuration
import-na [CONF_TAG] : import fidonet *.NA file
if CONF_TAG is not supplied, it will be prompted for
new : generate a new/initial configuration
import-areas PATH : import areas using fidonet *.NA or AREAS.BBS file from PATH
valid import-areas <args>:
--conf CONF_TAG : specify conference tag in which to import areas
--network NETWORK : specify network name/key to associate FTN areas
--uplinks UL1,UL2,... : specify one or more comma separated uplinks
--type TYPE : specifies area import type. valid options are "bbs" and "na"
`,
FileBase :
`usage: oputil.js fb <action> [<args>] <AREA_TAG|SHA|FILE_ID[@STORAGE_TAG] ...> [<args>]
where <action> is one of:
scan AREA_TAG|SHA|FILE_ID : scan specified areas
scan AREA_TAG : scan specified areas
AREA_TAG may be suffixed with @STORAGE_TAG; for example: retro@bbs
info AREA_TAG|FILE_ID|SHA : display information about areas and/or files
info AREA_TAG|SHA|FILE_ID : display information about areas and/or files
SHA may be a full or partial SHA-256
valid scan <args>:

View File

@ -39,6 +39,6 @@ module.exports = function() {
break;
default:
return printUsageAndSetExitCode('', ExitCodes.BAD_COMMAND);
return printUsageAndSetExitCode(getHelpFor('General'), ExitCodes.BAD_COMMAND);
}
};