From e3143827604e807f4deb4066ae205042a7c1baf7 Mon Sep 17 00:00:00 2001 From: MatMoul Date: Sat, 16 Mar 2024 22:23:39 +0100 Subject: [PATCH] Add package count on list cmd --- bin/pkgbuilder | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/pkgbuilder b/bin/pkgbuilder index 61323af..0d3978f 100755 --- a/bin/pkgbuilder +++ b/bin/pkgbuilder @@ -97,8 +97,10 @@ pkgList() { if [ ! -d "${PKGDIR}" ]; then return 1 fi + local PKGCOUNT=0 for PKGDIRNAME in "${PKGDIR}"/*; do [[ -e "${PKGDIRNAME}" ]] || break + PKGCOUNT=$((PKGCOUNT + 1)) local PKGNAME="" PKGNAME=$(basename "${PKGDIRNAME}") local VALUES=() @@ -117,6 +119,7 @@ pkgList() { VALUES+=("$(readSetting "${PKGDIRNAME}"/settings lastbuildstatus)") echo "${VALUES[@]}" done + echo "${PKGCOUNT} packages" } pkgInfos() { # $1=PKGNAME local -r PKGNAME=${1}