[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

ar archives

Daniel Brumbaugh Keeney

1/11/2008 2:03:00 PM

Is there cross-platform way of extracting or creating `ar' archives?


Daniel Brumbaugh Keeney

2 Answers

Eric Hodel

1/12/2008 8:40:00 PM

0

On Jan 11, 2008, at 06:03 AM, Daniel Brumbaugh Keeney wrote:

> Is there cross-platform way of extracting or creating `ar' archives?

ar(5) on my system says this:

> A file created with ar begins with the ``magic'' string "!<arch>
> \n". The rest of the archive is made up of objects, each of which
> is composed of a header for a file, a possible file name, and the
> file contents. The header is portable between machine
> architectures, and, if the file contents are printable, the archive
> is itself printable.

and proceeds to describe the latest version of the format which fits
in about 26 lines. It should be really easy.

It makes a note at the bottom of the magic strings for older versions
of ar, but these are probably ancient.

Thomas Hurst

1/13/2008 1:24:00 PM

0

* Eric Hodel (drbrain@segment7.net) wrote:

> On Jan 11, 2008, at 06:03 AM, Daniel Brumbaugh Keeney wrote:
>
>> Is there cross-platform way of extracting or creating `ar' archives?
[answer, which from a Mac user might only apply to BSD ar?]

Speaking of archive handling, a nice project for someone might be a Ruby
interface to BSD's libarchive[1], which would provide instant support
for tarballs of many different formats, cpio, pax, BSD/GNU ar, write
support for shar and read support for ISO images and zip archives, as
well as transparent gz/bz2/z handling. There's a Win32[2] port too.

1: http://people.freebsd.org/~kientzle/l...
2: http://gnuwin32.sourceforge.net/packages/liba...

--
Thomas 'Freaky' Hurst
http...