Tiny Core Linux
Tiny Core Extensions => TCE Q&A Forum => Topic started by: yoshi314 on January 15, 2013, 09:00:30 AM
-
Some packages have fairly lengthy instructions on how to set them up. Most of it is documented in the .info file which is only available from the app browser.
It would be nice to be able to install those files to some common location along with packages, for future reference. I know that i can do this by hand with a simple script, but automation of such tasks could be a life saver, especially when using tc offline.
The biggest problem i had was setting up web connection through mobile phone connected by bluetooth. Nearly every package in required chain of dependencies has its own setup instructions. None of which are available when you are offline.
That was a situation i was not prepared for, so i didn't download instructions in advance, i only had the necessary apps in ondemand.
-
Hi - you could probably do something like this to get your info files - This hasn't been tested BTW but I think it should work.
This will find each TCZ you have locally, and then attempt to get the .info file for it, and download it to the working directory.
cd $MNT$/tce/optional
find -iname '*tcz' -exec "wget http://tinycorelinux.net/4.x/x86/tcz/{}.info" \;
EDIT--
Sorry, got ahead of myself there. I've just realised you don't need a one liner.. You can probably edit the shell script which fetches the tcz to get the .info as well I imagine.
-
Hi yoshi314
You could automate the process yourself by creating a script that intercepts the call to AppBrowser (or whatever it's
called these days). Place a script in /usr/local/bin called appbrowser.
#!/bin/sh
exec /usr/bin/appbrowser
cd /etc/sysconfig/tcedir/optional
for i in `ls *.tcz`
do
[ -e "$i.info" ] && continue
tce-fetch.sh $i.info
done
This has not been tested either. It will start AppBrowser. Then when AppBrowser exits, it will go to your tce/optional
directory, scan for all .tcz files, if the info file for the .tcz is not present, it will fetch it. File names and locations are
based on TC4.1, yours may be slightly different.
@spence91: Doesn't the find command require that you give it a location to start searching in?
-
/opt/.tce_dir has not existed for a long time.
cd /etc/sysconfig/tcedir/optional
-
Hi gerald_clark
Thanks, forgot about that. Example corrected.
-
#!/bin/sh
exec /usr/bin/appbrowser
cd /etc/sysconfig/tcedir/optional
for i in `ls *.tcz`
do
[ -e "$i.tcz.info" ] && continue
tce-fetch.sh $i.tcz.info
done
I got Rich's suggestion to work by changing "$i.tcz.info" to "$i.info". It looks like ls is already returning the filename with the .tcz extension. This will be very helpful!
Thanks for the scripts :D
-
Hi zerophnx
You are right, i already contains the .tcz part of the file name. Example corrected, again.