pulsar/script/bootstrap
2013-10-14 15:14:03 +08:00

25 lines
607 B
JavaScript
Executable File

#!/usr/bin/env node
var safeExec = require('./utils/child-process-wrapper.js').safeExec;
var path = require('path');
var apmDir = path.join('vendor', 'apm');
var commands = [
'git submodule --quiet sync',
'git submodule --quiet update --recursive --init',
'cd vendor/apm; npm install --silent .',
'npm install --silent vendor/apm',
'echo',
'node node_modules/.bin/apm install --silent',
];
process.chdir(path.dirname(__dirname));
var i = 0;
var startCommands = function() {
if (i < commands.length)
safeExec(commands[i++], startCommands);
else
process.exit(0);
}
startCommands();