Tiny Core Linux

General TC => General TC Talk => Topic started by: SunBurnt on August 14, 2011, 12:27:34 AM

Title: Way to auto install extensions from a script?
Post by: SunBurnt on August 14, 2011, 12:27:34 AM
I`m thinking that most desktops have a browser with Flash, sound, and a file browser.
So new installs of TC can be configured automatically. Setups for special purposes.

I know the files can be saved and restored to do this, but a script is much smaller.
If the TC installer GUI has command line code behind it, then it`s easy to make...
Title: Re: Way to auto install extentions from a script?
Post by: Jason W on August 14, 2011, 02:23:38 AM
I see what you are getting at, and a little script that could be saved in one's email account could be dowloaded and run to quickly create ones desktop without remastering.  Here is an example, just add to or edit the list in quotations:

Code: [Select]
#!/bin/sh

for I in "minefield6.tcz \
emelfm2.tcz \
leafpad.tcz \
opera-11.tcz \
file.tcz \
xine-xvesa.tcz \
alsa.tcz"

do tce-load -iw "$I"; done


I also keep a basic "mydata.tgz" backup available in my mail account for easy access that has all my usual settings in it for unexpected sessions in cloud mode away from my normal box.  Most folks keep a usb drive for this, I just can't easily keep up with one without losing it.
Title: Re: Way to auto install extentions from a script?
Post by: robc on August 14, 2011, 09:55:15 PM
This is what I do in my build scripts
Code: [Select]
#!/bin/sh

installExtension() {
if [ ! -e /usr/local/tce.installed/$1 ]; then
echo "Installing "$1" ..."

if [ -e $TCEDIR/optional/$1.tcz ]; then
tce-load -i $1
else
tce-load -wi $1
fi

[ ! -e /usr/local/tce.installed/$1 ] && echo "Error: Extension "$1" not installed! Aborting" && exit
fi
}

# Install these extensions automagically
export EXTS="compiletc
squashfs-tools-4.x
tar"

for f in $EXTS; do
installExtension $f
done
Title: Re: Way to auto install extensions from a script?
Post by: SunBurnt on August 15, 2011, 10:16:41 AM
Thanks guys, it`s always nice to see others have had the same thought.

I`ll have to look at the command tce-load and see what options there are.