Add package count on list cmd
This commit is contained in:
parent
d450bd4280
commit
e314382760
@ -97,8 +97,10 @@ pkgList() {
|
|||||||
if [ ! -d "${PKGDIR}" ]; then
|
if [ ! -d "${PKGDIR}" ]; then
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
local PKGCOUNT=0
|
||||||
for PKGDIRNAME in "${PKGDIR}"/*; do
|
for PKGDIRNAME in "${PKGDIR}"/*; do
|
||||||
[[ -e "${PKGDIRNAME}" ]] || break
|
[[ -e "${PKGDIRNAME}" ]] || break
|
||||||
|
PKGCOUNT=$((PKGCOUNT + 1))
|
||||||
local PKGNAME=""
|
local PKGNAME=""
|
||||||
PKGNAME=$(basename "${PKGDIRNAME}")
|
PKGNAME=$(basename "${PKGDIRNAME}")
|
||||||
local VALUES=()
|
local VALUES=()
|
||||||
@ -117,6 +119,7 @@ pkgList() {
|
|||||||
VALUES+=("$(readSetting "${PKGDIRNAME}"/settings lastbuildstatus)")
|
VALUES+=("$(readSetting "${PKGDIRNAME}"/settings lastbuildstatus)")
|
||||||
echo "${VALUES[@]}"
|
echo "${VALUES[@]}"
|
||||||
done
|
done
|
||||||
|
echo "${PKGCOUNT} packages"
|
||||||
}
|
}
|
||||||
pkgInfos() { # $1=PKGNAME
|
pkgInfos() { # $1=PKGNAME
|
||||||
local -r PKGNAME=${1}
|
local -r PKGNAME=${1}
|
||||||
|
Loading…
Reference in New Issue
Block a user