bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Tar Feature Request


From: Andreas S. Oesterhelt
Subject: Tar Feature Request
Date: Sat, 5 Jan 2002 00:00:56 +0100 (MET)

Hello,

..there's an option that I miss in tar. Since I couldn't
believe that it's really not there, I asked on a programmer's
mailing list and got some answers along the lines of
"It's in fact missing and I'd like to see it too", so I
thinlk a feature request is in order:

When creating an archive it would be cool if one could 
specify a directory prefix to be used instead of the
actual base directory name.

Common need is for creating source tarballs from src
directories which usually have a name which is not
<name-of-project>-<version>, but which should unpack
into a directory of that name.

In a Makefile for a project of mine I currently use
a temporary symlink as a workaround.

tarball-src: clobber
  $(LN) -s current ../ijb-$(VERSION)-$(CODE_STATUS)
  $(TAR) -C.. -cvhzf ijb-$(VERSION)-$(CODE_STATUS)-src.tar.gz 
ijb-$(VERSION)-$(CODE_STATUS)
  $(RM) ../ijb-$(VERSION)-$(CODE_STATUS)

where "current" is the source dir's name. Apart from being 3 lines
instead of one, this also forces -h for the source tree, which
might not be desirable in all cases. Brute-force workaraound would
be a temporary rename of the source dir.

tarball-src: clobber
  $(TAR) -C.. --prefix=ijb-$(VERSION)-$(CODE_STATUS) -cvhzf 
ijb-$(VERSION)-$(CODE_STATUS)-src.tar.gz current

would be much more elegant.

Anyway, best regards & thanks for maintaining such
a useful piece of software,

--Andreas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]