* Lars Wirzenius [Fri, 09 Jan 2009 08:33:32 +0200]:

> to, 2009-01-08 kello 22:12 +0100, Adeodato Simó kirjoitti:
> > Package: moreutils
> > Severity: wishlist

> > Hello,

> > Here's a suggestion for moreutils: a command that implements the
> > tarball-unpacking logic of dpkg-source. That is, it unpacks a tarball
> > into a named directory, but if the tarball unpacked to a single
> > directory, all its contents are moved one level up (and that root
> > directory rmdir'ed).

> I haven't used it myself, but atool would seem to match this at a quick
> glance:

> Package: atool
> Depends: perl
> Description: A tool for managing file archives of various types
>  atool is a script for managing file archives of various types (tar,
>  tar+gzip, zip etc). The main command is probably aunpack,
>  extracting files from an archive. It overcomes the dreaded "multiple
>  files in archive root" problem by first extracting to a unique
>  subdirectory, and then moving back the files if possible. aunpack
>  also prevents local files from being overwritten by mistake.
>  .
>  Other commands provided are apack (create archives), als (list files
>  in archives), and acat (extract files to standard out).
> Homepage: http://www.nongnu.org/atool/

> Dato, does that do what you want?

Oh, I see, I didn't know about this package. It doesn't do exactly what
I meant, because you can't specify the directory you want the files
extracted to. The program could be patched to do that, I guess, though
I'll note it's a 2,000 lines script where a Python script that does my
suggested functionality is hardly 50.

On the other hand, since I'm only concerned with files in tar format, I
wonder if it wouldn't be a better idea to try and get the functionality
into tar itself directly.

Thanks for the pointer, Lars. For now I will continue using my script,
and think about the "into tar proper" idea. Joey, please close this bug
if you don't think such a script has a place in moreutils.

Cheers,

-- 
Adeodato Simó                                     dato at net.com.org.es
Debian Developer                                  adeodato at debian.org
 
To be nobody but yourself in a world which is doing its best night and
day to make you like everybody else means to fight the hardest battle
any human being can fight and never stop fighting.
                -- e.e. cummings




--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to