mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-13 10:02:38 +00:00
Added and doc'd -X flag to pkg_create that allows you to specify an exclude
list for the final package.
This commit is contained in:
parent
fc6e7c4535
commit
7cb39e249b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=445
@ -31,6 +31,7 @@ extern char *DeInstall;
|
||||
extern char *Contents;
|
||||
extern char *Require;
|
||||
extern char *PlayPen;
|
||||
extern char *ExcludeFrom;
|
||||
|
||||
void check_list(char *, Package *);
|
||||
void usage(const char *, const char *, ...);
|
||||
|
@ -16,7 +16,7 @@ static const char *rcsid = "$Id: main.c,v 1.4 1993/09/04 05:06:33 jkh Exp $";
|
||||
#include "lib.h"
|
||||
#include "create.h"
|
||||
|
||||
static char Options[] = "hvf:p:c:d:i:k:r:t:";
|
||||
static char Options[] = "hvf:p:c:d:i:k:r:t:X:";
|
||||
|
||||
char *Prefix = NULL;
|
||||
char *Comment = NULL;
|
||||
@ -26,6 +26,7 @@ char *DeInstall = NULL;
|
||||
char *Contents = NULL;
|
||||
char *Require = NULL;
|
||||
char *PlayPen = NULL;
|
||||
char *ExcludeFrom = NULL;
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
@ -73,6 +74,10 @@ main(int argc, char **argv)
|
||||
PlayPen = optarg;
|
||||
break;
|
||||
|
||||
case 'X':
|
||||
ExcludeFrom = optarg;
|
||||
break;
|
||||
|
||||
case 'h':
|
||||
case '?':
|
||||
default:
|
||||
@ -126,6 +131,7 @@ usage(const char *name, const char *fmt, ...)
|
||||
fprintf(stderr, "-k script de-install script\n");
|
||||
fprintf(stderr, "-r script pre/post requirements script\n");
|
||||
fprintf(stderr, "-t temp use temp as template for mktemp()\n");
|
||||
fprintf(stderr, "-X file exclude files listed in file\n");
|
||||
fprintf(stderr, "-v verbose\n");
|
||||
exit(1);
|
||||
}
|
||||
|
@ -141,9 +141,11 @@ make_dist(char *home, char *pkg, char *suffix, Package *plist)
|
||||
char args[10];
|
||||
|
||||
args[0] = '\0';
|
||||
if (ExcludeFrom)
|
||||
sprintf(args, "-X %s ", ExcludeFrom);
|
||||
sprintf(tball, "%s/%s.%s", home, pkg, suffix);
|
||||
if (index(suffix, 'z')) /* Compress/gzip? */
|
||||
strcpy(args, "z");
|
||||
strcat(args, "z");
|
||||
if (Verbose)
|
||||
printf("Creating gzip'd tar ball in '%s', contents:\n", tball);
|
||||
strcat(args, "cf");
|
||||
|
@ -118,6 +118,21 @@ space in your
|
||||
directory is limited. Be sure to leave some number of `X' characters
|
||||
for mktemp(3) to fill in with a unique ID.
|
||||
.B "Optional."
|
||||
.TP
|
||||
.BI "\-X\ " file
|
||||
Pass
|
||||
.I file
|
||||
as a
|
||||
.B \-exclude-from
|
||||
argument to
|
||||
.B tar
|
||||
when creating final package. See
|
||||
.B tar
|
||||
man page (or run
|
||||
.B tar
|
||||
with
|
||||
.B --help
|
||||
flag) for further information on using this flag.
|
||||
.PP
|
||||
.SH "TECHNICAL DETAILS"
|
||||
The "packing list" format (see \fB-f\fR) is fairly simple, being
|
||||
|
Loading…
Reference in New Issue
Block a user