Skip to content

Commit

Permalink
default gitshots to false, simplify install run
Browse files Browse the repository at this point in the history
* only run install on package type if there are configured packages to install
* default gitshots to false (moving away from this)
  • Loading branch information
atomantic authored Dec 19, 2018
1 parent 0affee1 commit c4164fb
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ inquirer.prompt([{
type: 'confirm',
name: 'gitshots',
message: 'Do you want to use gitshots?',
default: true
default: false
}]).then(function (answers) {
if(answers.gitshots){

Expand All @@ -32,19 +32,16 @@ inquirer.prompt([{
}
}

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)
['brew', 'cask', 'npm', 'gem'].forEach( type => {
if(config[type] && config[type].length){
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')
}
})

})

0 comments on commit c4164fb

Please sign in to comment.