Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 31 lines (20 sloc) 851 Bytes
#!/usr/bin/env node
exec = require('child_process').exec,
fs = require('fs'),
path = require('path');
require('../lib/config');
var newConfPath = path.normalize(process.env.CONF_DIR + '/conf'),
orgConfPath = path.normalize(__dirname + '/../conf/');
confDir = path.relative ? path.relative(path.dirname(newConfPath), orgConfPath) : orgConfPath;
//needed ONLY on first time initializing app
exec('mkdir -p '+process.env.CONF_DIR+'; mkdir -p '+ process.env.CONF_DIR + '/{my_conf,node_modules}; ln -s ' + confDir + ' ' + newConfPath, function() {
fs.stat(process.env.MAIN_CFG, function(err, stat) {
if(err) {
var cfg = "; DO NOT modify this config file - add custom scripts to my_conf/* \n\n \
[include] \n \
files = files = conf/*.conf my_conf/*.conf \n \
";
fs.writeFileSync(process.env.MAIN_CFG, cfg);
}
})
});
Jump to Line
Something went wrong with that request. Please try again.