mirror of
https://git.savannah.gnu.org/git/tar.git
synced 2026-06-09 00:32:38 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user