WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: view repository info.lst and display already downloaded + loaded tcz extentions  (Read 2394 times)

Offline mocore

  • Hero Member
  • *****
  • Posts: 508
  • ~.~
this post was a large part of the inspiration/motivation for this script
1. With "Load local", I am using a standard FLTK widget that just so happens to offer "favorites" where you can create a shortcut to selecting a file. I my drop that standard widget and just reuse some of my existing code. That way, I could display only "not already loaded" extensions that would be more practical and consistent with the rest of the layout.

i have imagined at times that it would be a good thing to see
what extensions all ready down loaded
and after coming a cross the above quote
 it seems to make seance to see
what extensions are loaded as well as down loaded

the script needs less.tcz to display colours  (to use it without less it needs modification)
and it will also download info.lst
i have only used it on 4.x
Code: [Select]
. /etc/init.d/tc-functions
 # is less instaled
 if [ ! -f /usr/local/tce.installed/less ] ; then
   tce-load -iw less

 # is info.lst avalible
 if [ ! -f /etc/sysconfig/tcedir/info.lst ] ; then
   url=`cat /opt/tcemirror`
   v=`version` ;v=${v:0:1}


   if [ "${v:0:1}" = "4" ] ; then
     tcz_path=`cat /opt/.tcedir`/optonal

   wget -P $dir $u

  # cat $info_file |less -r
info=`cat $info_file`

# do stuff
for i in $info
  if [ ! -f $tcz_path/$i ] ; then
       # extentions in repository
       #echo " >$i"

${NORMAL}  > $i"

${NORMAL}  > $i"

       # extentions downloaded
       #echo "< ${GREEN}$i${NORMAL}"
       tmp_string="<   ${GREEN}$i${NORMAL}"
       # extentions loaded
       if [ -f $tcz_installed/${i%.*} ] ; then
        tmp_string="<${YELLOW}!  ${GREEN}$i${YELLOW}!${NORMAL}"


# show all
 echo "$tmp_info"|less -r

# show local only (loaded&notloaded)
  #echo "$already_downloaded" |less -r
# show remote only
  #echo "$not_already_downloaded" |less -r

hears is quick key
<    downloaded
<!   downloaded +loaded
   > not downloaded 
and a screenshot

#^ April 16, 2012
 # ----
edit see also tce-status
http://goosh.org/#site%20tinycorelinux.net%20tce-status !
« Last Edit: April 25, 2013, 05:25:27 AM by dubcore »