myDSL Extensions (deprecated) :: .dsl file editing utilities



ooooooooooooooh, i might consider that for dsl-making.
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

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

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.

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.
Next Page...
original here.