Users online right now: 124 - Login  » search  » forum index  

Quick and dirty txz2lzm script

em
wrote 3 years ago


reply
Hi! I try to achieve a quick and dirty txz2lzm script!

#!/bin/bash
#
#Quick and dirty txz2lzm script
#
#Decompress .txz to .tar:
for f in *.txz; do xz -d $f; done
#Untar .tar to directories:
for f in *.tar; do d=`basename $f .tar`; mkdir $d; (cd $d && tar xf ../$f); done
#Delete .tar sources:
for f in *.tar; do rm -rfv $f; done
#Recompress directories to .lzm:

#Delete directories:


but finally, how to dir2lzm resulting directories to their respective .lzm files, and delete them?

If someone could help me!

Thanx in advance!
 
burninbush
wrote 3 years ago


reply
I have no clue what you are doing, or what a xxx.txz file might be ...

But dir2lzm on the top level directory of your temp directory structure will include everything that appears below it.

If that helps?
 
em
wrote 3 years ago


reply
burninbush thanx to you my friend! But that's not help me! Lol! But you try to help me and i wish to thanx for that and your previous help on the forum!

txz is the new slackware replacement tgz package format! A tar file compressed with the new XZ Utils compressor (lzma2) from The Tukaani Project!

http://tukaani.org/

http://tukaani.org/xz/

downloadable from here:

http://packages.slackware.it/package.php?q=current/xz-4.999.8beta-i486-1

Im looking for a bash script that can convert directly the Slackware .txz packages to Slax .lzm.

Some kind of replacement for tgz2lzm. It didnt exist yet! So i try to make one by myself!

Im near the final result!

But i didnt know how to convert multiple directory in multiple lzm at once by script!

If someone have a solution before i discover one ...

Thanx again for your time!

Regards!
 
ShaneCoyle
wrote 3 years ago


reply
I think you need to grab the latest pkgtools and xz tgz's from the slackware ftp, but then after that, you can continue to use the tgz2lzm script on txz's just as you always have on tgz's.

So, grab the pkgtools and xz packages here:
ftp://ftp.osuosl.org/pub/slackware/slackware-current/slackware/a/

either installpkg them if you save changes, or tgz2lzm them and save them in your modules directory and either activate or reboot.

From then on, tgz2lzm foo.txz foo.lzm will work just fine, I believe.
 
fanthom
wrote 3 years ago


reply
Hi em!

I wrote rest of Your script:

#!/bin/bash

for f in *
do
if [ "-d" "$f" ]; then
echo "working"
dir2lzm $f $f.lzm > /dev/null 2>&1
rm -r $f
else
echo "$f is not a directory - skipping"
fi
done
echo "all jobs done"

tested and works fine, enjoy!
 
em
wrote 3 years ago


reply
Thanx to both of you for your collaborative efforts to help me to make this script running!

This script run like a charm now! But take care it remove all of the directories at the end!

So run it in a temp directory with your .txz files inside!

Now we can convert many .txz to .lzm in one right clic! Like in tgz2lzm before!

I gonna make a konqueror service menu now for right clic!

Thanx again to all of you, burnin (youre help on the forum), Shane (youre good suggestion), fanthom (youre excellent script!).

I try to fix some things before publishing a KDE3/4 servicemenu to slax modules when it done!

Many thanx again, long live to Slax, Tomas and all contributors!

Have fun!
 
forum
wrote 3 years ago


reply
Em, you don't need this. If you're going to use txz packages, you will also need all base packages updated, and that means pkgtools, too. That gives txz support to tgz2lzm.

Sorry, but it's pointless. Nobody's going to use txz packages in Slackware 12.2-based distribution, it's just stupid (it may cause errors).
 
beny
wrote 3 years ago


reply
the new slackware package are txz if you wont convert they,you need a script like em script, tgz is old format if you have kde 4 the package are only txz.
 
em
wrote 3 years ago


reply
Its only an helping tool for me to batch process txz and learning bash scrit to, lol!

But take note thats txz it's the future of Slackware 13.0 & KDE 4 to, even if i always use old good tgz.

So, like beny said, its time to keep an eye to the future package managing!

Be cool, aware and have fun with Slax! Like ever ...
 
forum
wrote 3 years ago


reply
If you want to keep an eye, just install the new pkgtools (they come in tgz) and explore them.
beny, I know, but KDE 4 packages may not work on Slax one way or another because they are compiled with newer dependency packages.
 
ardu
wrote 1 year ago


reply
A simple .txz to .tgz converter, save the following script as txz2tgz.sh:


#!/bin/bash
#
for i in "$@"; do
o="$(basename $i .txz)".tgz
xz -dc "$i" | gzip -c > "$o"
done
 

  » search  » forum index  

Post your reply

Your name (Login):

Message:

These HTML tags are allowed: <quote>, <b>, <u>, <i>, <pre>, <code>, <small>, <h1>, <h2>, <h3>, <li>



Slax is generously supported by: P&P Software GmbH and wisol technologie GmbH