mirror of
https://github.com/KittyKatt/screenFetch.git
synced 2026-04-24 03:00:16 -04:00
Merge pull request #248 from darealshinji/patch-2
Count Chocolatey packages in Cygwin if present
This commit is contained in:
@@ -877,7 +877,14 @@ detectpkgs () {
|
||||
pkgs=$(if TMPDIR=/dev/null ASSUME_ALWAYS_YES=1 PACKAGESITE=file:///nonexistent pkg info pkg >/dev/null 2>&1; then
|
||||
pkg info | wc -l | awk '{print $1}'; else pkg_info | wc -l | awk '{sub(" ", "");print $1}'; fi)
|
||||
;;
|
||||
'Cygwin') cygfix=2; pkgs=$(($(cygcheck -cd | wc -l)-$cygfix)) ;;
|
||||
'Cygwin')
|
||||
cygfix=2
|
||||
pkgs=$(($(cygcheck -cd | wc -l) - ${cygfix}))
|
||||
if [ -d "/cygdrive/c/ProgramData/chocolatey/lib" ]; then
|
||||
chocopkgs=$(( $(ls -1 /cygdrive/c/ProgramData/chocolatey/lib | wc -l) ))
|
||||
pkgs=$((${pkgs} + ${chocopkgs}))
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
verboseOut "Finding current package count...found as '$pkgs'"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user