mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 06:23:19 -07:00
* bin/updates-available: add a --short option, which only displays the
number of updates available; show more info on --detail about upgrades Note: this will need to be improved for non Debian distros! Signed-off-by: Dustin Kirkland <kirkland@canonical.com>
This commit is contained in:
parent
07ed2e7e32
commit
fd943656b4
1 changed files with 6 additions and 5 deletions
|
@ -17,13 +17,14 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
if [ "$1" = "--detail" ]; then
|
||||
if [ "$1" = "--detail" -o "$1" = "--short" ]; then
|
||||
if [ -x "/usr/bin/apt-get" ]; then
|
||||
out=`/usr/bin/apt-get -s -o Debug::NoLocking=true upgrade | grep ^Inst | sed "s/^Inst //"`
|
||||
if [ -z "$out" ]; then
|
||||
printf "None"
|
||||
detail=`/usr/bin/apt-get -s -o Debug::NoLocking=true upgrade`
|
||||
if [ "$1" = "--detail" ]; then
|
||||
printf "$detail"
|
||||
else
|
||||
printf "$out"
|
||||
short=`printf "$detail" | grep ^Inst | wc -l`
|
||||
printf "$short"
|
||||
fi
|
||||
fi
|
||||
exit 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue