Skip to content

Commit

Permalink
✨ (dependencies): list only formulae, not dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
MickGe committed Dec 3, 2020
1 parent f388dcc commit deff862
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions Lister Homebrews.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@ else
echo "File $Target will be created"
fi


echo "# Hombrews $MyHostname" > "$Target"
echo "$IFS"'[TOC]' >> "$Target"

list_brews ()
{
printf '> firt: check for brew list --formula...%s' "$IFS"
ListBrews="$(brew list --formula)"
#ListBrews="$(brew list --formula)"
ListBrews="$(brew leaves)"
printf '> second: check for brew list --cask...%s' "$IFS"
ListCasks="$(brew list --cask)"
}
Expand All @@ -43,8 +44,9 @@ getMeta ()
local FormulaType
Formulae=$1
FormulaType=$2
echo "$IFS## ""$FormulaType" >> "$Target"
printf '> now, find descriptions of %s' "$FormulaType"
FormulaName=$3
echo "$IFS## ""$FormulaName" >> "$Target"
printf '> now, find descriptions of %s' "$FormulaName"
for Formula in $Formulae
do
printf "."
Expand Down Expand Up @@ -75,8 +77,8 @@ getAllMeta ()
{
printf 'Wait...%s' "$IFS"
list_brews
getMeta "${ListBrews[@]}" formula
getMeta "${ListCasks[@]}" cask
getMeta "${ListBrews[@]}" formula Formulae
getMeta "${ListCasks[@]}" cask Casks
echo 'Done!!!'
}

Expand Down

0 comments on commit deff862

Please sign in to comment.