Page 1 of 2
converting .txz files into .xzm for a whole folder
Posted: 28 Feb 2015, 02:07
by francois
I am trying to convert .txz files into .xzm for a whole folder. Here is my bash file (please do not laugh or if you do read out loud)
:
Code: Select all
#!/bin/bash
for i in *.txz
do
if [ "${i}" == "*.txz" ]
then
/opt/porteus-scripts/txz2xzm ${i} ${i}.xzm
fi
done
Re: converting .txz files into .xzm for a whole folder
Posted: 28 Feb 2015, 03:20
by francois
OK! Got it. I will name it
dir-txz2xzm
Code: Select all
#!/bin/bash
#just cd /directory-with-txz
#then type dir-txz2xzm
for i in *.txz
do
/opt/porteus-scripts/txz2xzm $i $i.xzm
done
Re: converting .txz files into .xzm for a whole folder
Posted: 28 Feb 2015, 03:36
by francois
Exciting lets do the dir-activate:
Code: Select all
#!/bin/bash
#will activate porteus modules of a whole directory
for i in *.xzm
do
/opt/porteus-scripts/activate $i.xzm
done
Re: converting .txz files into .xzm for a whole folder
Posted: 28 Feb 2015, 20:30
by fanthom
isnt it easier to run:
should also work for txz2xzm.
Re: converting .txz files into .xzm for a whole folder
Posted: 28 Feb 2015, 23:57
by francois
As you say: a lot more easy. Glad to know it now.
Thanks.
Re: converting .txz files into .xzm for a whole folder
Posted: 17 Apr 2015, 18:01
by francois
@fanthom:
Would there be some command for merging modules from a directory into a bundle?
Thanks.
Re: converting .txz files into .xzm for a whole folder
Posted: 17 Apr 2015, 22:35
by ncmprhnsbl
Two commands basicly, 1.extract all xzm to a directory, 2. build a module from that directory
Code: Select all
xzm2dir <list xzms> <directoryname>
dir2xzm <directoryname> <name>.xzm
which you probly already know
have a look here:
https://github.com/ncmprhnsbl/openbox/b ... x-build.sh
this is just an adaption from the xfce desktop module
this script basicly
1. installs txzs to directory,
2. extract xzms to same
3. copy configuration directories to that
4. runs some scripts on it(removing stuff,applying patches)
5.builds a module
with some extra stuff to automate the listing of xzms etc..
also freestyler made a gui for merging
http://forum.porteus.org/viewtopic.php?f=75&t=3532
not sure if his link working...
Re: converting .txz files into .xzm for a whole folder
Posted: 17 Apr 2015, 23:25
by francois
@ncmprhnsbl :
which you probly already know
I had the impression that it could be done this way or something like it. Its nice to have someone provide the solution for your eyes to the tip of your fingers once and a while.
Thanks so much.
Re: converting .txz files into .xzm for a whole folder
Posted: 18 Apr 2015, 01:56
by ncmprhnsbl
here is another way for step 1. that finds and adds xzms to the command
Code: Select all
for a in `ls|grep xzm`; do xzm2dir $a /to/your/modulename; done
Re: converting .txz files into .xzm for a whole folder
Posted: 21 Jul 2015, 17:40
by francois
@ncmprhnsbl:
This is not what I intended in the first post but this would please me now if it worked, but I would like to get a final single module for all of the modules at the end. I will have to try it: converting xzm into txz needs these batch steps:
1.0 create dir for each xzm
2.0 xzm2dir
3.0 dir2txz
4.0 pack into single module all the txz which could be provided by porteus package tools.
Is there a simple way to have that done?
Re: converting .txz files into .xzm for a whole folder
Posted: 21 Jul 2015, 19:34
by sunnysideofthesun
As for a topic title: script from this thread didn't work for your task
http://forum.porteus.org/viewtopic.php?f=53&t=957 ?
As for last post, I'm afraid I don't really understand what do you want to convert and into what. Seems like directions have changed.
Re: converting .txz files into .xzm for a whole folder
Posted: 21 Jul 2015, 23:31
by ncmprhnsbl
@sunny beware old threads ;-)
@francois "theres more than one way to grep a cat" (some are v messy) i can't see any value in converting modules to .txz
"Is there a simple way to have that done?"
open a terminal in the directory where your modules are(or cd), and do (as root):
Code: Select all
for a in `ls|grep xzm`; do xzm2dir $a /to/your/modulename; done
then
Code: Select all
dir2xzm /to/your/modulename <mergedmodule>.xzm
Re: converting .txz files into .xzm for a whole folder
Posted: 22 Jul 2015, 00:10
by francois
@ncmprhnsbl
I can't see any value in converting modules to .txz
What I want to do is to convert a folder in which there is gparted and its many dependencies separately in the module form. I realize that it would have been better to have them merged together. Maybe you have an even simpler solution to achieve this goal. Do you?
So some kind of function to merge xzms.
Re: converting .txz files into .xzm for a whole folder
Posted: 22 Jul 2015, 22:13
by Bogomips
ncmprhnsbl wrote:
open a terminal in the directory where your modules are(or cd), and do (as root):
Code: Select all
for a in `ls|grep xzm`; do xzm2dir $a /to/your/modulename; done
Why grep?
Code: Select all
for a in *.xzm; do xzm2dir $a /to/your/modulename; done
ncmprhnsbl wrote:then
Code: Select all
dir2xzm /to/your/modulename <mergedmodule>.xzm
Re: converting .txz files into .xzm for a whole folder
Posted: 23 Jul 2015, 08:53
by donald
@ francois
Hi
how about this?
https://www.porteus-apps.org/?q=xzm/mergexzm-11
(the link works at Time of posting)