Skip to content

Commit c27b5c1

Browse files
committed
Remove excess require / improve logging / test force flag
1 parent 2c4bd28 commit c27b5c1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@ var util = require('util');
55
var async = require('async');
66
var fs = require('fs');
77

8-
var Connection = require('ssh2');
98

109

1110
var root_local = process.env["HOME"] + "/boilerplate/reikijobsboard.com/out";
1211
var root_remote = "/home/reikiman/test-reikijobsboard.com";
13-
var force = false;
12+
var force = true;
1413

1514
var c = new Connection();
1615
c.on('connect', function() {
@@ -27,6 +26,7 @@ c.on('ready', function() {
2726
if (err) throw err;
2827
util.log('SFTP :: Handle closed');
2928
sftp.end();
29+
c.end();
3030
});
3131
});
3232
});
@@ -68,7 +68,7 @@ var doit = function(root_local, root_remote, sftp, dir, done) {
6868
function(file, cb) {
6969
var thepath = (dir !== "") ? (dir+'/'+file) : file;
7070
var localfile = root_local +'/'+ thepath;
71-
util.log('TEST ' + localfile);
71+
util.log('TEST ' + localfile +' PATH '+ thepath +' DIR '+ dir +' FILE '+ file);
7272
var statz = fs.statSync(localfile);
7373
// util.log(util.inspect(statz));
7474
if (statz.isDirectory()) {

0 commit comments

Comments
 (0)