X-Spam-Check-By: sourceware.org Message-ID: <464B6420.E36D5278@dessent.net> Date: Wed, 16 May 2007 13:05:52 -0700 From: Brian Dessent X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Adding to a windows zip file without zip.exe References: <10653042 DOT post AT talk DOT nabble DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Reply-To: cygwin AT cygwin DOT com Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Chadwick wrote: > Updating the servers with new cygwin or command line packages is not an > option at this point. > > That being said, I am a huge cygwin fan and am not willing to give up on a > shell script as my solution quite yet. > > The cygwin version on the servers does have gzip, gunzip, bzip2, bunzip2, > and unzip. > > Unfortunatly I have as yet been unsucceful in using these tools to add a > file to my windows zip archive. Don't make the mistake of assuming that gzip or bzip2 have anything to do with the .zip file format. They don't, and are totally separate, so those commands will be useless for your purposes. And I don't think there is any conceivable way of creating/updating an archive with unzip. I don't see any reason (other than policy) why you can't just have your script copy zip.exe into /usr/bin and then use it. It is completely standalone, depending on nothing but the Cygwin DLL: $ cygcheck /usr/bin/zip C:\cygwin\bin\zip.exe C:\cygwin\bin\cygwin1.dll C:\WINXP\system32\ADVAPI32.DLL C:\WINXP\system32\ntdll.dll C:\WINXP\system32\KERNEL32.dll C:\WINXP\system32\RPCRT4.dll If policy is the reason, then just have your script copy zip.exe to /tmp and then unlink it when it's done. Heck, if it had to the script could contain a uuencoded copy of zip.exe internally (it's only 64 kB in size) which is temporarily extracted and then deleted. You could do this with Perl and Archive::Zip, however this module is not included in the main Perl bundle, so you'd have to install it first, and if you can't install a simple and standard 64 kB binary in /usr/bin I don't see how you're going to install perl modules. I feel that any other solution is going to be a lot more work than just arranging to run zip.exe somehow. Brian -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/