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

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

parent 62c1a3f3
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
// $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 // A simple script that just copies a file on the local/server side
// Install using 'jsexec localcopy.js install' // 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 // Mnemonic (Command Key) L
// Protocol Name Local // Protocol Name Local
// Access Requirements SYSOP // Access Requirements SYSOP
...@@ -13,10 +11,12 @@ ...@@ -13,10 +11,12 @@
// Batch Upload Command Line ?localcopy send %g // Batch Upload Command Line ?localcopy send %g
// Batch Download Command Line ?localcopy recv %s // Batch Download Command Line ?localcopy recv %s
// Bi-dir Command Line // Bi-dir Command Line
// Native (32-bit) Executable No // Native Executable/Script Yes
// Supports DSZLOG No // Supports DSZLOG No
// Socket I/O No // Socket I/O No
require("sbbsdefs.js", "PROT_NATIVE");
// Copy a file, confirm over-write, preserving original date/time stamp // Copy a file, confirm over-write, preserving original date/time stamp
function fcopy(src, dest) function fcopy(src, dest)
{ {
...@@ -41,11 +41,12 @@ function main(cmd) { ...@@ -41,11 +41,12 @@ function main(cmd) {
switch(cmd) { switch(cmd) {
case 'install': case 'install':
case '-install':
var cnflib = load({}, "cnflib.js"); var cnflib = load({}, "cnflib.js");
var file_cnf = cnflib.read("file.cnf"); var file_cnf = cnflib.read("file.cnf");
if(!file_cnf) { if(!file_cnf) {
alert("Failed to read file.cnf"); alert("Failed to read file.cnf");
return(-1); exit(-1);
} }
file_cnf.prot.push({ file_cnf.prot.push({
key: 'L' key: 'L'
...@@ -55,13 +56,14 @@ function main(cmd) { ...@@ -55,13 +56,14 @@ function main(cmd) {
, batulcmd: '?localcopy send %g' , batulcmd: '?localcopy send %g'
, batdlcmd: '?localcopy recv %s' , batdlcmd: '?localcopy recv %s'
, ars: 'SYSOP' , ars: 'SYSOP'
, settings: PROT_NATIVE
}); });
if(!cnflib.write("file.cnf", undefined, file_cnf)) { if(!cnflib.write("file.cnf", undefined, file_cnf)) {
alert("Failed to write file.cnf"); alert("Failed to write file.cnf");
return(-1); exit(-1);
} }
return(0); exit(0);
case 'send': case 'send':
if(file_isdir(argv[1])) { /* batch upload */ if(file_isdir(argv[1])) { /* batch upload */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment