Supply more information to the --to-command script.

* src/system.c (stat_to_env): Pass information about the current
volume in variables TAR_ARCHIVE, TAR_VOLUME, TAR_BLOCKING_FACTOR,
TAR_FORMAT.
* doc/tar.texi: Document new environment variables.
* NEWS: Likewise.
* configure.ac: Version number 1.22.91.
This commit is contained in:
Sergey Poznyakoff
2010-02-25 10:34:29 +02:00
parent b7899bb121
commit 762be4f2bd
4 changed files with 44 additions and 4 deletions

View File

@@ -629,6 +629,12 @@ static void
stat_to_env (char *name, char type, struct tar_stat_info *st)
{
str_to_env ("TAR_VERSION", PACKAGE_VERSION);
str_to_env ("TAR_ARCHIVE", *archive_name_cursor);
dec_to_env ("TAR_VOLUME", archive_name_cursor - archive_name_array + 1);
dec_to_env ("TAR_BLOCKING_FACTOR", blocking_factor);
str_to_env ("TAR_FORMAT",
archive_format_string (current_format == DEFAULT_FORMAT ?
archive_format : current_format));
chr_to_env ("TAR_FILETYPE", type);
oct_to_env ("TAR_MODE", st->stat.st_mode);
str_to_env ("TAR_FILENAME", name);