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-23 03:20:31 +0400
committerBryan Drewery <bryan@shatow.net>2014-04-23 03:20:31 +0400
commite6684a81f4d68b6c6d7f41d98ee328166eaa5d3f (patch)
tree79d48f69c0eec9687f6e6cdb55b625a4994ee311
parent09d328d92d4981113753c6bb2e6a79866512d3a9 (diff)
status: Add -l to show LOG path instead of URL
-rw-r--r--completions/zsh/_poudriere1
-rw-r--r--src/bin/poudriere.82
-rwxr-xr-xsrc/share/poudriere/status.sh11
3 files changed, 11 insertions, 3 deletions
diff --git a/completions/zsh/_poudriere b/completions/zsh/_poudriere
index c97f5a98..52b406d3 100644
--- a/completions/zsh/_poudriere
+++ b/completions/zsh/_poudriere
@@ -118,6 +118,7 @@ _status=(
'-a[show all builds, not just currently running]'
'-B[which build to match on]:buildname'
'-j[run only inside the given jail]::name:_poudriere_jail'
+ '-l[show logs instead of URL]'
'-p[specify on which portstree we work]::tree:_poudriere_pt'
'-H[Do not print headers and separate fields by a single tab instead of arbitrary white space.]'
'-z[Specify on which SET to use]::'
diff --git a/src/bin/poudriere.8 b/src/bin/poudriere.8
index 5bc9ea32..bf269f73 100644
--- a/src/bin/poudriere.8
+++ b/src/bin/poudriere.8
@@ -601,6 +601,8 @@ flag.
Specifies the
.Ar name
of the jail to view the status of.
+.It Fl l
+Show logs instead of URL.
.It Fl p Ar tree
This flag specifies which ports
.Ar tree
diff --git a/src/share/poudriere/status.sh b/src/share/poudriere/status.sh
index 9c98e27b..dcdc38b0 100755
--- a/src/share/poudriere/status.sh
+++ b/src/share/poudriere/status.sh
@@ -35,6 +35,7 @@ Options:
"latest")
-j name -- Run on the given jail
-p tree -- Specify on which ports tree the configuration will be done
+ -l -- Show logs instead of URL.
-H -- Script mode. Do not print headers and separate fields by a
single tab instead of arbitrary white space.
-z set -- Specify which SET to use
@@ -50,10 +51,11 @@ SETNAME=""
BUILDNAME=latest
SCRIPT_MODE=0
ALL=0
+URL=1
. ${SCRIPTPREFIX}/common.sh
-while getopts "aB:j:p:Hz:" FLAG; do
+while getopts "aB:j:lp:Hz:" FLAG; do
case "${FLAG}" in
a)
ALL=1
@@ -66,6 +68,9 @@ while getopts "aB:j:p:Hz:" FLAG; do
jail_exists ${OPTARG} || err 1 "No such jail: ${OPTARG}"
JAILNAME=${OPTARG}
;;
+ l)
+ URL=0
+ ;;
p)
PTNAME=${OPTARG}
;;
@@ -113,7 +118,7 @@ else
format="%-30s %-25s %6s %5s %6s %7s %7s %7s %s"
printf "${format}" "JAIL" "STATUS" "QUEUED" \
"BUILT" "FAILED" "SKIPPED" "IGNORED" "TOBUILD"
- if [ -n "${URL_BASE}" ]; then
+ if [ -n "${URL_BASE}" ] && [ ${URL} -eq 1 ]; then
echo -n "URL"
else
echo -n "LOGS"
@@ -145,7 +150,7 @@ else
nbbuilt=$(bget stats_built 2>/dev/null || :)
nbtobuild=$((nbqueued - (nbbuilt + nbfailed + nbskipped + nbignored)))
url=
- if [ -n "${URL_BASE}" ]; then
+ if [ -n "${URL_BASE}" ] && [ ${URL} -eq 1 ]; then
url="${URL_BASE}/${POUDRIERE_BUILD_TYPE}/${MASTERNAME}/${BUILDNAME}"
else
url="$(log_path)"