[OS X TeX] compressing files az .zip

Peter Dyballa Peter_Dyballa at Web.DE
Sun Aug 1 16:52:30 EDT 2010


Am 01.08.2010 um 05:22 schrieb Vafa Khalighi:

> How can I remove these extra Mac files from the zip file?


Why not try to avoid archiving this debris?

Zip allows to add at the end of the command line an exclude list like:

	zip ... archive file(s) -x {._\*,\*/._\*,.DS_Store,\*/.DS_Store}

Here meta characters need to be escaped. To ease handling them zip  
offers to use a file with the exclude list. It can start with:

	._*
	.DS_Store
	*/._*
	*/.DS_Store

The file can be put into a central directory, say, your Documents  
directory, so that your zip invocation can now be:

	zip ... archive file(s) -x@$HOME/Documents/zip_exclude.lst

Another nice option of zip is setting the environment variable ZIPOPT.  
It *cannot* include the exclude list, it can include for example a  
list of file extensions which should not compress. By default it does  
not try to compress files with the extensions

	.Z .zip .zoo .arc .lzh .arj

which is very old. Some more could be added:

	.gz 
  .bz2 
  .tgz 
  .tbz 
  .tbz2 
  .jar 
  .rar 
  .cab 
  .sit 
  .sitx 
  .tif 
  .tiff 
  .jpeg 
  .jpg 
  .gif 
  .png .mp* .snd .aif .aifc .aiff .pdf .flac .kmz .odt .flv .swf .mov

So the environment variable ZIPOPT could be set to "- 
n 
  .gz 
:.bz2 
:.tgz 
:.tbz 
:.tbz2 
:.jar 
:.rar 
:.cab 
:.sit 
:.sitx 
:.tif 
:.tiff 
:.jpeg 
:.jpg 
:.gif:.png:.snd:.aif:.aifc:.aiff:.pdf:.flac:.kmz:.odt:.flv:.swf:.mov"  
to extend the default setting. A good place to set it is the file  
~/.MacOSX/environment.plist.

--
Greetings

   Pete
               <\
                 \__     O                       __O
                 | O\   _\\/\-%                _`\<,
                 '()-'-(_)--(_)               (_)/(_)




More information about the MacOSX-TeX mailing list