From 00c4eec582fdb8fb91e24305f325e15a6644ef5f Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Mon, 23 Nov 2009 19:25:18 -0600 Subject: [PATCH] * bin/updates_available, statusrc: move the color coding out to the config file --- bin/updates_available | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bin/updates_available b/bin/updates_available index ba4882bf..e976a87b 100755 --- a/bin/updates_available +++ b/bin/updates_available @@ -17,6 +17,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +PKG="byobu" +[ -r "/etc/$PKG/statusrc" ] && . "/etc/$PKG/statusrc" + if [ "$1" = "--detail" -o "$1" = "--short" ]; then if which apt-get >/dev/null; then detail=`apt-get -s -o Debug::NoLocking=true upgrade` @@ -35,13 +38,13 @@ print_updates() { s=$2 if [ -n "$u" ]; then if [ "$u" -gt 0 ]; then - printf "\005{=b rW}%d\005{-}\005{= rW}!" "$u" + printf "$brW%d$XXX$rW!" "$u" if [ -n "$s" ]; then if [ "$s" -gt 0 ]; then printf "!" fi fi - printf "\005{-} " + printf "$XXX " fi fi }