Submitted by: Peter Hawkins <peter@clari.net.au>
Actually implement --norecurse as documented in the man page.
This commit is contained in:
parent
a954e88d0b
commit
52ebfb9d0f
@ -1,3 +1,9 @@
|
||||
Sun Dec 14 07:47:44 1997 Peter Hawkins (peter@clari.net.au)
|
||||
|
||||
* version.c: Released version 1.11.3.
|
||||
|
||||
* implemented the -n / --norecurse option
|
||||
|
||||
Thu Mar 25 13:32:40 1993 Michael I Bushnell (mib@geech.gnu.ai.mit.edu)
|
||||
|
||||
* version.c: Released version 1.11.2.
|
||||
|
@ -148,7 +148,7 @@ create_archive ()
|
||||
|
||||
while (p = name_from_list ())
|
||||
dump_file (p, -1, 1);
|
||||
/* if(!f_dironly) { */
|
||||
if(!f_dironly) {
|
||||
blank_name_list ();
|
||||
while (p = name_from_list ())
|
||||
{
|
||||
@ -165,7 +165,7 @@ create_archive ()
|
||||
}
|
||||
}
|
||||
}
|
||||
/* } */
|
||||
}
|
||||
free (buf);
|
||||
}
|
||||
else
|
||||
@ -764,10 +764,8 @@ dump_file (p, curdev, toplevel)
|
||||
}
|
||||
|
||||
/* Now output all the files in the directory */
|
||||
#if 0
|
||||
if (f_dironly)
|
||||
return; /* Unless the cmdline said not to */
|
||||
#endif
|
||||
/*
|
||||
* See if we are crossing from one file system to another,
|
||||
* and avoid doing so if the user only wants to dump one file system.
|
||||
|
@ -3,7 +3,7 @@
|
||||
.\"
|
||||
.\" Written by John F. Woods <jfw@jfwhome.funhouse.com>
|
||||
.\"
|
||||
.\" $Id: tar.1,v 1.9 1997/06/05 23:12:13 max Exp $
|
||||
.\" $Id: tar.1,v 1.10 1997/06/23 04:51:55 steve Exp $
|
||||
.\"
|
||||
.Dd August 6, 1994
|
||||
.Os FreeBSD
|
||||
@ -197,6 +197,9 @@ Don't extract file modified time.
|
||||
.It Fl M
|
||||
.It Fl -multi-volume
|
||||
Create/list/extract multi-volume archive.
|
||||
.It Fl n
|
||||
.It Fl -norecurse
|
||||
Don't recurse into subdirectories when creating.
|
||||
.It Fl N Ar date
|
||||
.It Fl -after-date Ar date
|
||||
.It Fl -newer Ar date
|
||||
@ -289,8 +292,6 @@ Block the output of compression program for tapes or floppies
|
||||
(otherwise writes will be of odd length, which device drivers may reject).
|
||||
.It Fl [0-7][lmh]
|
||||
Specify tape drive and density.
|
||||
.It Fl -norecurse
|
||||
Don't recurse into subdirectories when creating.
|
||||
.It Fl -unlink
|
||||
Unlink files before creating them.
|
||||
.El
|
||||
|
@ -187,6 +187,7 @@ struct option long_options[] =
|
||||
|
||||
{"unlink", 0, &f_unlink, 1},
|
||||
{"fast-read", 0, &f_fast_read, 1},
|
||||
{"norecurse", 0, 0, 'n'},
|
||||
|
||||
{0, 0, 0, 0}
|
||||
};
|
||||
@ -313,7 +314,7 @@ options (argc, argv)
|
||||
|
||||
/* Parse options */
|
||||
while ((c = getoldopt (argc, argv,
|
||||
"-01234567Ab:BcC:df:F:g:GhikK:lL:mMN:oOpPrRsStT:uvV:wWxX:zZ",
|
||||
"-01234567Ab:BcC:df:F:g:GhikK:lL:mMnN:oOpPrRsStT:uvV:wWxX:zZ",
|
||||
long_options, &ind)) != EOF)
|
||||
{
|
||||
switch (c)
|
||||
@ -535,6 +536,12 @@ options (argc, argv)
|
||||
f_multivol++;
|
||||
break;
|
||||
|
||||
case 'n': /* don't recurse into subdirectories */
|
||||
if (f_oldarch)
|
||||
goto badopt;
|
||||
f_dironly++;
|
||||
break;
|
||||
|
||||
case 'N': /* Only write files newer than X */
|
||||
get_newer:
|
||||
f_new_files++;
|
||||
@ -547,7 +554,7 @@ options (argc, argv)
|
||||
break;
|
||||
|
||||
case 'o': /* Generate old archive */
|
||||
if (f_gnudump /* || f_dironly */ )
|
||||
if (f_gnudump || f_dironly )
|
||||
goto badopt;
|
||||
f_oldarch++;
|
||||
break;
|
||||
@ -730,6 +737,7 @@ Other options:\n\
|
||||
fputs ("\
|
||||
-m, --modification-time don't extract file modified time\n\
|
||||
-M, --multi-volume create/list/extract multi-volume archive\n\
|
||||
-n, --norecurse don't recurse into subdircectories\n\
|
||||
-N, --after-date DATE,\n\
|
||||
--newer DATE only store files newer than DATE\n\
|
||||
-o, --old-archive,\n\
|
||||
|
@ -193,9 +193,7 @@ TAR_EXTERN int cmd_mode;
|
||||
|
||||
|
||||
TAR_EXTERN int f_reblock; /* -B */
|
||||
#if 0
|
||||
TAR_EXTERN char f_dironly; /* -D */
|
||||
#endif
|
||||
TAR_EXTERN int f_dironly; /* -n ... PH */
|
||||
TAR_EXTERN int f_run_script_at_end; /* -F */
|
||||
TAR_EXTERN int f_gnudump; /* -G */
|
||||
TAR_EXTERN int f_follow_links; /* -h */
|
||||
|
@ -1 +1 @@
|
||||
char version_string[] = "GNU tar version 1.11.2";
|
||||
char version_string[] = "GNU tar version 1.11.3";
|
||||
|
Loading…
Reference in New Issue
Block a user