mirror of
https://github.com/gooba42/adventureland.git
synced 2026-10-14 10:33:47 -05:00
18 lines
963 B
JavaScript
18 lines
963 B
JavaScript
var path=require("path"),f=require(path.resolve(__dirname, "functions.js"));
|
|
require(process.env.HOME+"/thegame/scripts/data.js");
|
|
|
|
f.execso("node ~/gscripts/prepare_server.js;");
|
|
console.log("\nPrepared the server");
|
|
|
|
for(var id in machines)
|
|
{
|
|
var machine=machines[id];
|
|
// var command="scp -qv -r -i "+machine.key+" ~/deploy/server "+machine.user+"@"+machine.ip+":./ 2>&1 | grep -e 'Sending file modes' -e 'Exit status'";
|
|
var command="rsync -rui --exclude='node_modules/' --exclude='package-lock.json' -e 'ssh -i "+machine.key+"' ~/deploy/server/ "+machine.user+"@"+machine.ip+":./adventureland/";
|
|
//var command="rsync -ru ~/deploy/server -e \"ssh -i "+machine.key+"\" "+machine.user+"@"+machine.ip+":./";
|
|
// Spent 50 minutes on perfecting the scp output, bastards didn't provide a non-interactive output argument ... [05/08/18]
|
|
// command+=" > /tmp/scp.log 2>&1";
|
|
console.log("\nRunning: "+command);
|
|
f.execso(command);
|
|
//f.execso("cat /tmp/scp.log");
|
|
} |