Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/freebsd/poudriere.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryan Drewery <bryan@shatow.net>2014-04-24 02:27:36 +0400
committerBryan Drewery <bryan@shatow.net>2014-04-24 02:27:36 +0400
commit5eb4a9eb221af64059ae9f86fa530c7a83b2d26f (patch)
tree993c50469cf549b6976ab61bde63aec3f65fe709
parent36cb6e773727e0a6f4f4f0b78bc1cbe688f3730d (diff)
status: Allow filtering output with -z and -p, using -j still shows a single listing
-rwxr-xr-xsrc/share/poudriere/status.sh14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/share/poudriere/status.sh b/src/share/poudriere/status.sh
index e7b0580a..07bab057 100755
--- a/src/share/poudriere/status.sh
+++ b/src/share/poudriere/status.sh
@@ -46,8 +46,8 @@ EOF
SCRIPTPATH=`realpath $0`
SCRIPTPREFIX=`dirname ${SCRIPTPATH}`
-PTNAME=default
-SETNAME=""
+PTNAME=
+SETNAME=
BUILDNAME=latest
SCRIPT_MODE=0
ALL=0
@@ -102,7 +102,7 @@ POUDRIERE_BUILD_TYPE=bulk
now="$(date +%s)"
if [ -n "${JAILNAME}" ]; then
- MASTERNAME=${JAILNAME}-${PTNAME}${SETNAME:+-${SETNAME}}
+ MASTERNAME=${JAILNAME}-${PTNAME:-default}${SETNAME:+-${SETNAME}}
MASTERMNT=${POUDRIERE_DATA}/build/${MASTERNAME}/ref
if [ ${ALL} -eq 0 ]; then
jail_runs ${MASTERNAME} || \
@@ -141,6 +141,14 @@ else
BUILDNAME="$(BUILDNAME="${ORIG_BUILDNAME}" bget buildname 2>/dev/null || :)"
# No matching build, skip.
[ -z "${BUILDNAME}" ] && continue
+ ptname=$(bget ptname)
+ setname=$(bget setname)
+ if [ -n "${PTNAME}" ]; then
+ [ "${ptname}" = "${PTNAME}" ] || continue
+ fi
+ if [ -n "${SETNAME}" ]; then
+ [ "${setname}" = "${SETNAME}" ] || continue
+ fi
status=$(bget status 2>/dev/null || :)
nbqueued=$(bget stats_queued 2>/dev/null || :)