* 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:
Dustin Kirkland 2009-05-02 14:22:56 -05:00
commit 90bb4835a1
2 changed files with 7 additions and 3 deletions

View file

@ -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

View file

@ -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