mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-20 21:43:19 -07:00
* bin/updates_available, statusrc: move the color coding out to the config
file
This commit is contained in:
parent
b0d8246e05
commit
00c4eec582
1 changed files with 5 additions and 2 deletions
|
@ -17,6 +17,9 @@
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
PKG="byobu"
|
||||||
|
[ -r "/etc/$PKG/statusrc" ] && . "/etc/$PKG/statusrc"
|
||||||
|
|
||||||
if [ "$1" = "--detail" -o "$1" = "--short" ]; then
|
if [ "$1" = "--detail" -o "$1" = "--short" ]; then
|
||||||
if which apt-get >/dev/null; then
|
if which apt-get >/dev/null; then
|
||||||
detail=`apt-get -s -o Debug::NoLocking=true upgrade`
|
detail=`apt-get -s -o Debug::NoLocking=true upgrade`
|
||||||
|
@ -35,13 +38,13 @@ print_updates() {
|
||||||
s=$2
|
s=$2
|
||||||
if [ -n "$u" ]; then
|
if [ -n "$u" ]; then
|
||||||
if [ "$u" -gt 0 ]; 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 [ -n "$s" ]; then
|
||||||
if [ "$s" -gt 0 ]; then
|
if [ "$s" -gt 0 ]; then
|
||||||
printf "!"
|
printf "!"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
printf "\005{-} "
|
printf "$XXX "
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue