[spe.pycs.net] tar.gz releases

Guillermo Fernandez Castellanos guillermo.fernandez at epfl.ch
Tue Dec 16 17:15:21 CET 2003


It works :-)

I have:
test/subfolder/nothing.rtf

Cheers,

Guille

www.stani.be wrote:

>Hi Guillermo,
>I tried it and it worked under windows. Can you open
>the file under Linux? Than I can adapt the file
>myself, as I want to put it in my build script. It's a
>small file, so I included it as an attachment.
>Thanks,
>Stani
>
>--- Guillermo Fernandez Castellanos
><guillermo.fernandez at epfl.ch> wrote:
>  
>
>>Cheers,
>>
>>    
>>
>>>Question:
>>>If anyone has a small windows program which can
>>>convert a directory in a tar.gz with one click (not
>>>first tar and than gz) I'll can change the zip
>>>      
>>>
>>source
>>    
>>
>>>releases into tar.gz, as windows users will use the
>>>exe release.
>>> 
>>>
>>>      
>>>
>>Did not try this under windows, but should work just
>>fine (python 
>>portability ;-)
>>It's a quick and dirty script, I can improve it
>>later if you wish.
>>
>>import sys
>>import tarfile
>>import gzip
>>
>>if len(sys.argv)!=3:
>>    print "Bad number of arguments"
>>    print sys.argv[0], "outputfile dir_to_add"
>>    sys.exit(1)
>>tar = tarfile.open(sys.argv[1]+".tar", "w")
>>tar.add(sys.argv[2])
>>tar.close()
>>gz = gzip.open(sys.argv[1]+".tar.gz","w")
>>tar=open(sys.argv[1]+".tar","r")
>>gz.write(tar.read())
>>gz.close()
>>
>>Could someone try it under windows and see if the
>>file is readable under 
>>*NIX?
>>I'm under Linux rigth now, and the tar.gz file
>>created works just fine :-)
>>
>>The syntax is:
>>program outputfile(without the .tar.gz extension)
>>dir_to_add
>>
>>If it works, I could extend it to read standard
>>input and a list of dirs.
>>
>>Guille
>>
>>_______________________________________________
>>Spe-user mailing list
>>Spe-user at blender.org
>>http://www.blender.org/mailman/listinfo/spe-user
>>    
>>
>
>__________________________________
>Do you Yahoo!?
>New Yahoo! Photos - easier uploading and sharing.
>http://photos.yahoo.com/
>




More information about the Spe-user mailing list