Re: [dev] [sbase] Adding tar

2013-07-07 Thread Markus Wichmann
On Sat, Jul 06, 2013 at 10:53:01PM -0500, Galos, David wrote: I also see it a lot in scripts, along with using full options instead of short--perhaps to be more verbose? So, for compatibility, perhaps it is best to allow both. If you mean GNU --long-options, then never in a million years :)

Re: [dev] [sbase] Adding tar

2013-07-07 Thread Truls Becken
On 2013-07-07, at 05:53, David Galos wrote: If sbase gains programs to do compression, and the code is nicely librarized, I will consider thinking about considering adding letting tar do that. Why not call out to the compression program? Pipes are not patented by shells. This decouples things

Re: [dev] [sbase] Adding tar

2013-07-07 Thread Calvin Morrison
Why don't we just use popen? On Jul 7, 2013 3:24 AM, Markus Wichmann nullp...@gmx.net wrote: On Sat, Jul 06, 2013 at 10:53:01PM -0500, Galos, David wrote: I also see it a lot in scripts, along with using full options instead of short--perhaps to be more verbose? So, for compatibility,

Re: [dev] [sbase] Adding tar

2013-07-07 Thread Strake
On 06/07/2013, Galos, David galos...@students.rowan.edu wrote: The attached patch shows my current work on adapting sltar to sbase. It is functional, but, there are still open questions regarding tar. The big deal is the argument parsing: I would like to use the ARG macros in tar, but I'm not

Re: [dev] [sbase] Adding tar

2013-07-07 Thread Thorsten Glaser
Strake dixit: miss them. Archiver/compressor integration loses, for it needs a flag and code for each compression format. I’d not use those anyway. I normally compress with: find foo -type f | sort | cpio -oC512 -Hustar | gzip -n9 foo.tgz Failing that, this one’s almost the same: tar -b 1 -cf

[dev] [sbase] Adding tar

2013-07-06 Thread Galos, David
The attached patch shows my current work on adapting sltar to sbase. It is functional, but, there are still open questions regarding tar. The big deal is the argument parsing: I would like to use the ARG macros in tar, but I'm not sure how that fits with the average tar invocation. In short, how

Re: [dev] [sbase] Adding tar

2013-07-06 Thread Dmitrij Czarkoff
On Jul 6, 2013 12:16 PM, Galos, David galos...@students.rowan.edu wrote: In short, how do you fine folks invoke your tar? $ tar czf filename.tar.gz foldername $ tar tzf filename.tar.gz $ tar xzf filename.tar.gz Dmitrij D. Czarkoff

Re: [dev] [sbase] Adding tar

2013-07-06 Thread Daniel Bryan
tar xzf filename.tar.gz ~/scratch/ On 06/07/2013 8:20 PM, Dmitrij Czarkoff czark...@gmail.com wrote: On Jul 6, 2013 12:16 PM, Galos, David galos...@students.rowan.edu wrote: In short, how do you fine folks invoke your tar? $ tar czf filename.tar.gz foldername $ tar tzf filename.tar.gz $

Re: [dev] [sbase] Adding tar

2013-07-06 Thread v4hn
Also $ tar cjf file.tar.bz2 folder $ tar cJf file.tar.xz folder and $ tar xf filename.tar.compression-suffix On Sat, Jul 06, 2013 at 08:30:39PM +1000, Daniel Bryan wrote: tar xzf filename.tar.gz ~/scratch/ On 06/07/2013 8:20 PM, Dmitrij Czarkoff czark...@gmail.com wrote: On Jul 6, 2013

Re: [dev] [sbase] Adding tar

2013-07-06 Thread Dmitrij Czarkoff
Apparently is there anybody who uses dashes in tar's keys? Dmitrij D. Czarkoff

Re: [dev] [sbase] Adding tar

2013-07-06 Thread Daniel Bryan
On 06/07/2013 8:30 PM, Daniel Bryan danbr...@gmail.com wrote: tar xzf filename.tar.gz ~/scratch/ Sorry, this should have been: tar xzf filename.tar.gz -C ~/scratch/

Re: [dev] [sbase] Adding tar

2013-07-06 Thread Andrew Hills
On Sat, 6 Jul 2013 10:59:36 -0400 Alex Pilon a...@alexpilon.ca wrote: On Sat, Jul 06, 2013 at 01:29:02PM +0200, Dmitrij Czarkoff wrote: Apparently is there anybody who uses dashes in tar's keys? Yeah. Old habit. I also see it a lot in scripts, along with using full options instead of

Re: [dev] [sbase] Adding tar

2013-07-06 Thread Dmitrij Czarkoff
On Jul 6, 2013 5:04 PM, Andrew Hills ahi...@ednos.net wrote: So, for compatibility, perhaps it is best to allow both. You mean the whole lot of GNU tar long options including filename rewriting and masks? I don't see any way such implementation could fit suckless principles. I would suggest a

Re: [dev] [sbase] Adding tar

2013-07-06 Thread Truls Becken
On 2013-07-06, at 12:15, David Galos wrote: In short, how do you fine folks invoke your tar? My habit relays on compression scheme detection: tar cf foo.txz ~/stuff tar xf bar.tbz -Truls

Re: [dev] [sbase] Adding tar

2013-07-06 Thread Roberto E. Vargas Caballero
I would suggest a subset of POSIX tar options. It could be possibly amended with z, Z, j and J options, though using A $ tar c dirname | gzip -9c filename.tar.gz or A $ tar cf - dirname | gzip -9c filename.tar.gz I usually use: gunzip file.tar.gz | tar xf

Re: [dev] [sbase] Adding tar

2013-07-06 Thread Galos, David
I also see it a lot in scripts, along with using full options instead of short--perhaps to be more verbose? So, for compatibility, perhaps it is best to allow both. If you mean GNU --long-options, then never in a million years :) If you mean both dashed and non, that is likely what I will do.