forked from atomantic/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
34 lines (30 loc) · 983 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
const emoji = require('node-emoji')
// const inquirer = require('inquirer')
const config = require('./config')
const command = require('./lib_node/command')
// inquirer.prompt([{
// type: 'confirm',
// name: 'gitshots',
// message: 'Do you want to use gitshots?',
// default: true
// }]).then(function (answers) {
// if(answers.gitshots){
// // ensure ~/.gitshots exists
// command('mkdir -p ~/.gitshots', __dirname, function(err, out) {
// if(err) console.error(err)
// });
// }
const installPackages = function(type){
console.info(emoji.get('coffee'), ' installing '+type+' packages')
config[type].map(function(item){
console.info(type+':', item);
command('. lib_sh/echos.sh && . lib_sh/requirers.sh && require_'+type+' ' + item, __dirname, function(err, out) {
if(err) console.error(emoji.get('fire'), err)
});
});
}
installPackages('brew');
installPackages('cask');
installPackages('npm');
installPackages('gem');
// });