Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (6) </ 1 [2] 3 4 5 6 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: .dsl file editing utilities, a little automation never hurts< Next Oldest | Next Newest >
ico2 Offline





Group: Members
Posts: 802
Joined: July 2004
Posted: Nov. 20 2004,23:13 QUOTE

ooooooooooooooh, i might consider that for dsl-making.

--------------
ico2
Back to top
Profile PM MSN 
clacker Offline





Group: Members
Posts: 570
Joined: June 2004
Posted: Nov. 29 2004,23:06 QUOTE

Here are two tricks I found.  I don't know how "button friendly" they are, but I thought I'd toss them here since they really are dsl files editing utilities.

The first looks for files in a dsl package that already exist on your system.  I thought this would help avoid overwriting files:

Code Sample
#!/bin/bash
# finds files in an archive that already exist on the system
# you can use the file "deleters" to remove repeats

tar -ztf $1 > files
cat files | while read i
do
  if [ -e "/$i" ]
  then
     echo $i >> deleters
  fi
done


The second is for when you want to make a dsl that uses ke4nt1's gtk.dsl package.  That helps keep your dsl size down when you use gtk2.0 or a later version of perl:

Code Sample
#!/bin/bash
tar -ztf $1 > files_new
tar -ztf gtk.dsl > files_gtk
cat files_new | while read i
do
   grep $i files_gtk >> deleters
done


That technique should also work with the tcl dsl in the same way.

Then unzip your archive and use tar to remove the duplicates from your package:

Code Sample
mv somenewdsl.dsl somenewdsl.tar.gz
gunzip somenewdsl.tar.gz
tar -vf somenewdsl.tar --delete -T deleters
gzip somenewdsl.tar
mv somenewdsl.tar.gz somenewdsl.dsl
Back to top
Profile PM 
ke4nt1 Offline





Group: Members
Posts: 2329
Joined: Oct. 2003
Posted: Nov. 30 2004,03:14 QUOTE

sweet...

I have used similar tactics from the command line.
This will help with upgrading the gtk2.dsl as well when it becomes neccessary.

tnx fer sharing..

73
ke4nt
Back to top
Profile PM 
SaidinUnleashed Offline





Group: Members
Posts: 1428
Joined: Mar. 2004
Posted: Nov. 30 2004,04:11 QUOTE

GTK 2.6 comes out soon does't it?

/me shudders because he is sure it will be fatter than it already is...

I wish more apps would use FLTK.

-J.P.


--------------
They say if you play a Microsoft CD backwards, you hear satanic messages. That's nothing, cause if you play it forwards, it installs Windows.

Unleash the power of the TILDE~~~
Back to top
Profile PM AOL MSN YIM 
clacker Offline





Group: Members
Posts: 570
Joined: June 2004
Posted: Nov. 30 2004,14:24 QUOTE

I can see now that the code I wrote in the first section isn't finding duplicates, at least not all of them.  I think I needed -s instead of -e, but that code doesn't work either.  I also added quotes and a / around the $i in the first code section so that it would look for files from the root directory.
Back to top
Profile PM 
27 replies since Oct. 04 2004,00:17 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (6) </ 1 [2] 3 4 5 6 >/
reply to topic new topic new poll
Quick Reply: .dsl file editing utilities

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code