Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions screenfetch-dev
Original file line number Diff line number Diff line change
Expand Up @@ -1469,10 +1469,20 @@ detectpkgs () {
fi
;;
'Msys')
pkgs=$(pacman -Qq | wc -l)
if [ -d "/c/ProgramData/chocolatey/lib" ]; then
chocopkgs=$(ls -1 /c/ProgramData/chocolatey/lib | wc -l)
pkgs=$((pkgs + chocopkgs))
# Git for Windows (Msys-based) does not have any package manager
if command -v pacman &> /dev/null; then
# for Msys
pkgs=$(pacman -Qq | wc -l)
if [ -d "/c/ProgramData/chocolatey/lib" ]; then
chocopkgs=$(ls -1 /c/ProgramData/chocolatey/lib | wc -l)
pkgs=$((pkgs + chocopkgs))
fi
else
# for Git for Windows
if [ -d "/c/ProgramData/chocolatey/lib" ]; then
chocopkgs=$(ls -1 /c/ProgramData/chocolatey/lib | wc -l)
pkgs="$pkgs + $chocopkgs" # shows "Unknown + 1234"
fi
fi
;;
'Haiku')
Expand Down