From 450888106608a916122b27a8c036953d149280b5 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Mon, 11 May 2020 01:12:35 +0200 Subject: [PATCH] moved to bin --- src/index.js => bin/unbrew.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) rename src/index.js => bin/unbrew.js (83%) mode change 100644 => 100755 diff --git a/src/index.js b/bin/unbrew.js old mode 100644 new mode 100755 similarity index 83% rename from src/index.js rename to bin/unbrew.js index 155550d..eb16cdd --- a/src/index.js +++ b/bin/unbrew.js @@ -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'))