WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Way to auto install extensions from a script?  (Read 1857 times)

Offline SunBurnt

  • Full Member
  • ***
  • Posts: 102
Way to auto install extensions from a script?
« 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...
« Last Edit: August 15, 2011, 11:34:27 AM by SunBurnt »

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: Way to auto install extentions from a script?
« Reply #1 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.
« Last Edit: August 14, 2011, 02:25:56 AM by Jason W »

Offline robc

  • Sr. Member
  • ****
  • Posts: 447
Re: Way to auto install extentions from a script?
« Reply #2 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
"Never give up! Never surrender!" - Commander Peter Quincy Taggart

"Make it so." - Captain Picard

Offline SunBurnt

  • Full Member
  • ***
  • Posts: 102
Re: Way to auto install extensions from a script?
« Reply #3 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.