moved to bin

This commit is contained in:
cupcakearmy 2020-05-11 01:12:35 +02:00
parent c9302eef75
commit 4508881066
No known key found for this signature in database
GPG Key ID: D28129AE5654D9D9
1 changed files with 8 additions and 6 deletions

14
src/index.js → bin/unbrew.js Normal file → Executable file
View File

@ -1,3 +1,5 @@
#!/usr/bin/env node
const cp = require('child_process')
const chalk = require('chalk')
@ -40,13 +42,13 @@ async function main() {
])
console.log('🗑 Uninstalling:', chalk.bold.blue(getLoosers(keepers).join(' ')))
// while (true) {
// const loosers = getLoosers(keepers)
// if (!loosers.length) break
while (true) {
const loosers = getLoosers(keepers)
if (!loosers.length) break
// const joinedLoosers = loosers.join(' ')
// cp.execSync(`brew uninstall ${joinedLoosers}`)
// }
const joinedLoosers = loosers.join(' ')
cp.execSync(`brew uninstall ${joinedLoosers}`)
}
console.log('🧽 Cleaning up')
cp.execSync(`brew cleanup`)
console.log(chalk.bold.green('🚀 Done'))