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

Address installation issues (e.g. set the "native" settings flag)

parent 4c6ac57b
No related branches found
No related tags found
No related merge requests found
// $Id: localcopy.js,v 1.3 2020/05/14 01:25:32 rswindell Exp $
// A simple script that just copies a file on the local/server side
// Install using 'jsexec localcopy.js install'
// Or manually in SCFG->File Options->File Transfer Protcools:
// Or manually in SCFG->File Options->File Transfer Protocols:
// Mnemonic (Command Key) L
// Protocol Name Local
// Access Requirements SYSOP
......@@ -13,9 +11,11 @@
// Batch Upload Command Line ?localcopy send %g
// Batch Download Command Line ?localcopy recv %s
// Bi-dir Command Line
// Native (32-bit) Executable No
// Supports DSZLOG No
// Socket I/O No
// Native Executable/Script Yes
// Supports DSZLOG No
// Socket I/O No
require("sbbsdefs.js", "PROT_NATIVE");
// Copy a file, confirm over-write, preserving original date/time stamp
function fcopy(src, dest)
......@@ -41,11 +41,12 @@ function main(cmd) {
switch(cmd) {
case 'install':
case '-install':
var cnflib = load({}, "cnflib.js");
var file_cnf = cnflib.read("file.cnf");
if(!file_cnf) {
alert("Failed to read file.cnf");
return(-1);
exit(-1);
}
file_cnf.prot.push({
key: 'L'
......@@ -55,13 +56,14 @@ function main(cmd) {
, batulcmd: '?localcopy send %g'
, batdlcmd: '?localcopy recv %s'
, ars: 'SYSOP'
, settings: PROT_NATIVE
});
if(!cnflib.write("file.cnf", undefined, file_cnf)) {
alert("Failed to write file.cnf");
return(-1);
exit(-1);
}
return(0);
exit(0);
case 'send':
if(file_isdir(argv[1])) { /* batch upload */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment