Tiny Core Linux

Tiny Core Base => TCB Tips & Tricks => Topic started by: xor on October 27, 2020, 02:11:55 AM

Title: [how] listing all applications installed on the system; (with version number)!?
Post by: xor on October 27, 2020, 02:11:55 AM
[how to do it!? ] listing all applications installed on the system; (with version number)!?

what is the command for this job !?

Quote
for MS  : https://www.codetwo.com/admins-blog/how-to-check-installed-software-version/
Title: Re: [how] listing all applications installed on the system; (with version number)!?
Post by: jazzbiker on October 27, 2020, 03:52:59 AM
Hi, xor!

I think You need the script to extract the "Current:" field from .tcz.info files for extensions, installed on Your system.
Title: Re: [how] listing all applications installed on the system; (with version number)!?
Post by: polikuo on October 27, 2020, 06:15:59 AM
Hi jazzbiker
I think You need the script to extract the "Current:" field from .tcz.info files for extensions, installed on Your system.

[Version] is a better field of choice, many packages may have patches applied, the [Current] field would focus on that.

Either way, you'll have to download the info files.
Title: Re: [how] listing all applications installed on the system; (with version number)!?
Post by: Rich on October 27, 2020, 06:42:19 AM
Hi jazzbiker
The  Current:  field always lists a modification date, but does not always list a version number. As polikuo suggested,  Version:
is the field to use.
Title: Re: [how] listing all applications installed on the system; (with version number)!?
Post by: jazzbiker on October 27, 2020, 09:22:46 AM
Thanks, guys! You are precise.
@xor, community is interested in such script, please share it after You finish crafting.
Title: Re: [how] listing all applications installed on the system; (with version number)!?
Post by: Sashank999 on November 08, 2020, 08:21:43 PM
Hi !

This doesn't require much coding :
Code: [Select]
#!/bin/ash
for i in "$@"
do
    case "${i}" in
      -\?|-h|--help) echo -e "This Script is designed to give the version string of the tczs installed on the current system.\nOptionally, you could give '--tcz=' option with the tcz name at the end or give space separated tcz names as arguments."; exit ;;
      --tcz=*) GIVENTCZ="${GIVENTCZ} $(basename ${i#--tcz=} .tcz)" ;;
      *) GIVENTCZ="${GIVENTCZ} $(basename ${i} .tcz)" ;;
    esac
done
if [ "$GIVENTCZ" = "" ]; then
    tce-status -i | while IFS= read -r TCZ
    do
        echo -e "${TCZ}\t$(tce-fetch.sh -O ${TCZ}.info | grep -i '^Version' | tr -d ' ' | tr -d '\t' | cut -d: -f2)"
    done
else
    for TCZ in $GIVENTCZ
    do
        echo -e "${TCZ}.tcz \t$(tce-fetch.sh -O ${TCZ}.tcz.info | grep -i '^Version' | tr -d ' ' | tr -d '\t' | cut -d: -f2)"
    done
fi