From 52ec48e06f3942a77ce804121931839c1f30ee8b Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Tue, 21 Nov 2017 05:59:47 +0100 Subject: [PATCH] termux-tools: Avoid pm list in termux-info (#1426) --- packages/termux-tools/build.sh | 2 +- packages/termux-tools/termux-info | 26 +++++--------------------- 2 files changed, 6 insertions(+), 22 deletions(-) diff --git a/packages/termux-tools/build.sh b/packages/termux-tools/build.sh index 9004636f9..43d1b4266 100644 --- a/packages/termux-tools/build.sh +++ b/packages/termux-tools/build.sh @@ -1,6 +1,6 @@ TERMUX_PKG_HOMEPAGE=https://termux.com/ TERMUX_PKG_DESCRIPTION="Basic system tools for Termux" -TERMUX_PKG_VERSION=0.48 +TERMUX_PKG_VERSION=0.49 TERMUX_PKG_PLATFORM_INDEPENDENT=yes TERMUX_PKG_CONFFILES="etc/motd" diff --git a/packages/termux-tools/termux-info b/packages/termux-tools/termux-info index eee919f2b..012f81f72 100755 --- a/packages/termux-tools/termux-info +++ b/packages/termux-tools/termux-info @@ -2,24 +2,11 @@ if [ "$#" != "0" ]; then - echo 'usage: termux-info' - echo 'Provides information about Termux, and the current system. Helpful for debugging.' - exit + echo 'usage: termux-info' + echo 'Provides information about Termux, and the current system. Helpful for debugging.' + exit fi - - -version() { - if [ -e "$PREFIX/version" ]; then - cat "$PREFIX/version" - else - #Last version that didn't have a way to detect Termux version - echo '<=0.48' - fi -} -apps() { - pm list packages -i | grep com.termux -} updates() { apt update >/dev/null 2>&1 updatable=$(apt list --upgradable 2>/dev/null | tail -n +2) @@ -29,11 +16,8 @@ updates() { echo "$updatable" fi } -output="Termux version: -$(version) -Installed Termux apps: -$(apps) -Updatable packages: + +output="Updatable packages: $(updates) System information: $(uname -a)