mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 06:23:19 -07:00
* bin/cpu-count: don't echo blank line in detailed status
* bin/updates-available: print "None" in detailed status, if no updates are available Signed-off-by: Dustin Kirkland <kirkland@canonical.com>
This commit is contained in:
parent
a7a84b2e4a
commit
90bb4835a1
2 changed files with 7 additions and 3 deletions
|
@ -18,8 +18,7 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
count=`grep -c "^processor.*:" /proc/cpuinfo`
|
||||
[ "$count" = "1" ] || echo $count"x"
|
||||
[ "$count" = "1" ] || printf "%sx" "$count"
|
||||
if [ "$1" = "--detail" ]; then
|
||||
echo
|
||||
exit 0
|
||||
fi
|
||||
|
|
|
@ -19,7 +19,12 @@
|
|||
|
||||
if [ "$1" = "--detail" ]; then
|
||||
if [ -x "/usr/bin/apt-get" ]; then
|
||||
/usr/bin/apt-get -s -o Debug::NoLocking=true upgrade | grep ^Inst | sed "s/^Inst //"
|
||||
out=`/usr/bin/apt-get -s -o Debug::NoLocking=true upgrade | grep ^Inst | sed "s/^Inst //"`
|
||||
if [ -z "$out" ]; then
|
||||
printf "None"
|
||||
else
|
||||
printf "$out"
|
||||
fi
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue