From c3374a27be64e2ec65679ce5f487cad69143b59f Mon Sep 17 00:00:00 2001 From: dchakro <35454738+dchakro@users.noreply.github.com> Date: Mon, 12 Aug 2024 11:24:48 -0700 Subject: [PATCH] add a command to write package and cask dependency tree --- brewlog.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/brewlog.sh b/brewlog.sh index c9f90e5..58f5b1e 100644 --- a/brewlog.sh +++ b/brewlog.sh @@ -26,6 +26,7 @@ OPTIONS: --help Show help --brew-help Show brew commands (alias to "brew help") version Show brewlog version info + tree Write the dependency tree of all installed packages & casks to a file archive Archives the current log file as .xz (gzip as fallback if xz not found) find [TERM] grep the TERM in the logfile. tail [-n INT] Show the last "INT" lines from the log file. @@ -75,6 +76,10 @@ elif [ "$1" == "--brew-help" ]; then elif [ "$1" == "version" ]; then VERSION exit 0; +elif [ "$1" == "tree" ]; then + brew deps --tree --installed >> $HOME/Logs/brew_tree.txt + echo "package and cask dependency tree updated. Find it here: ~/Logs/brew_tree.txt" + exit 0; elif [ "$1" == "tail" ]; then if [ "$2" == "-n" ]; then # tail with specified number of lines