Tiny Core Linux
General TC => General TC Talk => Topic started by: aus9 on February 14, 2013, 07:47:51 AM
-
Hi
I am a simple coder
this kind of works as I need to download a package (tce-load -w cups)
find out where that package is with
TCE1=`cat /etc/sysconfig/backup_device`
# now use
cp /mnt/$TCE1/optional/cups.tcz /tmp
is this acceptable?
I know what to do when its there, I am just looking for any gotchas
-
While the default is to have the backup stored in the tce directory, it is not a given that the backup device and tce directory will always be the same.
On recent releases of Core, use
cp /etc/sysconfig/tcedir/optional/cups.tcz /tmp
/etc/sysconfig/tcedir is a symbolic link to your actual tce directory, wherever that might be.
-
excellent!
atm it now looks like
mkdir /tmp/cupsunpack
if [ ! -f /etc/sysconfig/tcedir/optional/cups.tcz ] ; then
tce-load -w cups
cp /etc/sysconfig/tcedir/optional/cups.tcz /tmp/cupsunpack
else cp /etc/sysconfig/tcedir/optional/cups.tcz /tmp/cupsunpack
fi
the unsquashing is done later and can be outside the if then