MCPcopy
hub / github.com/pstadler/flightplan / task

Function task

lib/transport/shell.js:106–125  ·  view source on GitHub ↗
(remote)

Source from the content-addressed store, hash-verified

104 var self = this;
105
106 var task = function(remote) {
107 var sshFlags = (remote.privateKey ? ' -i ' + remote.privateKey : '');
108 var remoteUrl = util.format('%s%s:%s',
109 (remote.username ? remote.username + '@' : ''),
110 remote.host, remoteDir);
111
112 var command = util.format('rsync --files-from %s %s --rsh="ssh -p%s%s" ./ %s',
113 tmpFile, rsyncFlags,
114 remote.port || 22, sshFlags, remoteUrl);
115
116 var future = new Future();
117
118 new Fiber(function() {
119 results.push(self.exec(command, options));
120
121 return future.return();
122 }).run();
123
124 return future;
125 };
126
127 var tasks = [];
128 self._context.hosts.forEach(function(remote) {

Callers 1

shell.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected