commit 7e8f5ceb726c401cde09efca2c79fe4e5aec8d33 parent 12ee75e6971adaad17cd7c8377d3e5ef1d6ce5a0 Author: Alex Balgavy <a.balgavy@gmail.com> Date: Wed, 25 Apr 2018 23:19:33 +0200 Brewmaster prompts user to accept upgrades, and makes use of notify function Diffstat:
M | .commonprofile | | | 13 | ++++++++++--- |
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/.commonprofile b/.commonprofile @@ -56,15 +56,22 @@ brewmaster() { brew update; brew outdated; brew cask outdated; - /usr/bin/read -n1 -p "Press any key to continue..." -s; - echo "Continuing with upgrade." + notify "Finished reading updates" "Click to view outdated packages." + echo -n "Continue? [Y/n]" + read -sqn CONF + + if [ "$CONF" != "y" ]; then + echo "\nUser cancelled." + return 1 + fi + echo "\nContinuing with upgrade." brew upgrade; brew cask upgrade; brew cleanup -s; brew cask cleanup; brew prune; brew doctor; - notify; + notify "Brewed." "All packages have been upgraded."; } gemmaster() {