WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: How to list&download installed extentions  (Read 3212 times)

Offline buggy

  • Newbie
  • *
  • Posts: 24
How to list&download installed extentions
« on: May 10, 2009, 09:50:40 AM »
Hi

My HD just died, so I've been using Tinycore for 2 hours, now I've installed the minimal amount of software that I need. But how do I save this list of extentions so I don't have to download them via GUI every time?

This is what I want to do:
1. boot tinycore
2. install extensions
3. make a list of these extension and save it somewhere (doesn't matter where)

Then when I reboot :
1. boot tinycore
2. get my list of extentions from somewhere
3. download the extentions listed  <-------- THIS is the important part.
4. install them

EDIT: I found this discussion on how to download extensions, tce-load will check md5:s and all that.
« Last Edit: May 10, 2009, 06:15:52 PM by buggy »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14826
Re: How to list&download installed extentions
« Reply #1 on: May 10, 2009, 09:54:37 AM »
How did you boot tc - from cd or from usb stick?

If you booted from a usb stick, you can create a folder named /tce, put the extensions in this folder and they will automatically load at boot.

If you booted from cd, you need to look at the "remastering" topic in the wiki

Offline buggy

  • Newbie
  • *
  • Posts: 24
Re: How to list&download installed extentions
« Reply #2 on: May 10, 2009, 09:59:11 AM »
What I have is a "cloud computer". I PXE boot from a server that I can't log on to at the moment.. :-) So I have no local storage at all, the only thing I have is the net.

In the control panel->system stats->extensions there is a list of installed extensions, I want to save this list and use that list to  download  them every time I start tinycore.

Offline buggy

  • Newbie
  • *
  • Posts: 24
Re: How to list&download installed extentions
« Reply #3 on: May 10, 2009, 10:03:05 AM »
I've found that list now in /usr/local/tce.installed so all I need is getting the urls in someway..

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11048
Re: How to list&download installed extentions
« Reply #4 on: May 10, 2009, 10:34:14 AM »
You can loop with tce-load and the extension name:

Quote
for i in `cat mylist`; do
tce-load "$i" wget install
done
The only barriers that can stop you are the ones you create yourself.

Offline buggy

  • Newbie
  • *
  • Posts: 24
Re: How to list&download installed extentions
« Reply #5 on: May 10, 2009, 11:39:36 AM »
Yeah that seems to work, some problems though I haven't found anylist with the whole extension filename. That is I have to download the .tcel/.tce/.tcem (anyother extensions?) file but in /usr/loca/tce.installed you only get the basename...


So this is my hack to fix that, but I really don't want to have to do this:

Code: [Select]
URL=http://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/tce/
for EXT in tcem tcel tce; do
  ls -1 /usr/local/tce.installed/ |
    sed "s|^|wget -q $URL|;s/$/.$EXT.info \& /" | sh
done

sleep 2
echo Waiting 8 seconds for downloads to finnish
sleep 8
grep ^Title: *info| sed 's/.*[ \t:]//' >my_extensions.txt



And then I run your script:
Code: [Select]
for i in `cat my_extensions.txt`; do
tce-load "$i" wget install
done

Offline buggy

  • Newbie
  • *
  • Posts: 24
Making a persistent store without using local storage
« Reply #6 on: September 10, 2009, 12:21:45 PM »
So I wanted to do this again, and it need a little update.  Not really sure how this should be made easy for users to use.

0. for all extension types
1. take the names of all installed extensions (this list of packages are taken from the dir /usr/local/tce.installed)
3. try to download the from tinycore website
4. put the successful ones in the file my_extensions.txt

Code: [Select]
URL=http://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/2.x/tce/
for EXT in tcem tcel tce; do
  ls -1 /usr/local/tce.installed/ |
    sed "s|^|wget -q $URL|;s/$/.$EXT.info \& /" | sh
done

echo Waiting 8 seconds for downloads to finnish (You have to wait) ; sleep 8

grep ^Title: *info| sed 's/.*[ \t:]//' >my_extensions.txt
echo "You can find all extension in the "my_extensions.txt" file


Load extension by using the tinycore command tce-load.. I usually download the my_extension file from a website at boot and then run this.
Code: [Select]
echo "Loading all extensions"
for extension in `cat my_extensions.txt`; do
  echo " trying to load [$extension].."
  tce-load "$extension" wget install
done
echo Done loading all extensions.