X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fbrew-run;h=26ad5380f47faf2b7634c923a1ba8194173485ae;hb=HEAD;hp=7b9ccd61039280619cbd4d69f49ab9a01e077966;hpb=50cbe66141958852f6470c4e7392c051e346ecb6;p=homebrew-alex.git diff --git a/cmd/brew-run b/cmd/brew-run index 7b9ccd6..26ad538 100755 --- a/cmd/brew-run +++ b/cmd/brew-run @@ -18,15 +18,20 @@ unset dir ax_common ax_common_sourced ax_msg - "Updating Homebrew installation ..." brew update || ax_abort "Update failed!" -outdated=$( brew outdated --quiet | wc -l | tr -d '\t ' ) -if [ $outdated -gt 0 ]; then +outdated=$( brew outdated --verbose | grep -F -cv "pinned at" ) +if [ "$outdated" -gt 0 ]; then echo - ax_msg - "$outdated formula outdated:" + ax_msg - "$outdated formula & casks outdated:" brew outdated --verbose || ax_abort "Failed to list outdated packages!" echo - brew upgrade --cleanup || ax_abort "Upgrade failed!" + brew upgrade --ignore-pinned || ax_abort "Upgrade failed!" + echo + + ax_msg - "Cleaning up ..." + brew cleanup --prune=2 || ax_abort "\"brew cleanup\" failed!" echo else ax_msg 0 "Nothing outdated." + echo fi