From dea33c667e444d56e031bde0c0b705590b32a6d0 Mon Sep 17 00:00:00 2001 From: CyberLeo Date: Thu, 28 Apr 2011 13:28:56 -0500 Subject: [PATCH] j: begin refactoring status to support multiple chroot query [broken] --- j | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/j b/j index 3ced9a5..5e9af8e 100755 --- a/j +++ b/j @@ -109,7 +109,12 @@ j_up() { } j_status() { - j_up "${1}" && meh "$(printf '\033[1;32mup\033[0m')" || meh "$(printf '\033[1;31mdown\033[0m')" + [ -z "${1}" ] && set - $(l_ls) + while [ "${1}" ] + do + j_up "${1}" && meh "$(printf '\033[1;32mup\033[0m')" || meh "$(printf '\033[1;31mdown\033[0m')" + shift + done } # Mount /dev/pts and /proc in the chroot @@ -148,7 +153,7 @@ j_stop() { } case "${cmd}" in -status) j_status "${jname}" ;; +status) j_status "${jname}" "${@}" ;; start) j_start "${jname}" ;; shell|enter) j_shell "${jname}" ;; eval) j_eval "${jname}" "${*}" ;; -- 2.45.0