Doc new % sequence expansion for command execution.

Fixed bad verbose message.
This commit is contained in:
jkh 1993-09-18 03:39:21 +00:00
parent 1bb96bf0e1
commit c8b21d348c
2 changed files with 52 additions and 7 deletions

View File

@ -1,5 +1,5 @@
#ifndef lint
static const char *rcsid = "$Id: perform.c,v 1.5 1993/09/04 05:06:33 jkh Exp $";
static const char *rcsid = "$Id: perform.c,v 1.6 1993/09/12 20:56:40 jkh Exp $";
#endif
/*
@ -146,7 +146,7 @@ make_dist(char *home, char *pkg, char *suffix, Package *plist)
if (index(suffix, 'z')) /* Compress/gzip? */
strcat(args, "z");
if (Verbose)
printf("Creating gzip'd tar ball in '%s', contents:\n", tball);
printf("Creating gzip'd tar ball in '%s'\n", tball);
strcat(args, "cf");
if (ExcludeFrom)
ret = vsystem("tar %sX %s %s .", args, tball, ExcludeFrom);

View File

@ -157,11 +157,56 @@ Execute
.I command
as part of the unpacking process. If
.I command
contains a `%s/%s' sequence somewhere in it, it will be expanded to
the name of the current directory and last filename extracted. In
practice, such weird things should be unnecessary in all but the most
extenuating circumstances, but it's there should you need it
nonetheless.
contains a any of the following sequences somewhere in it, they will
be expanded inline. For the following examples, assume that
.B @cwd
is set to
.B /usr/local
and the last extracted file was
.B bin/emacs.
.TP
.I "%F"
Expands to the last filename extracted (as specified), in the example case
.B bin/emacs
.TP
.I "%D"
Expands to the current directory prefix, as set with
.B @cwd,
in the example case
.B /usr/local.
.TP
.I "%B"
Expands to the "basename" of the fully qualified filename, that
is the current directory prefix, plus the last filespec, minus
the trailing filename. In the example case, that would be
.B /usr/local/bin.
.TP
.I "%f"
Expands to the "filename" part of the fully qualified name, or
the converse of
.B %B
, being in the example case,
.B emacs.
.TP
.BI "@unexec\ " command
Execute
.I command
as part of the deinstallation process. Expansion of special
.B %
sequences is the same as for
.B @exec.
This command is not executed during the package add, as
.B @exec
is, but rather when the package is deleted. This is useful
for creating links and other ancillary files that were created
as a result of adding the package, but not directly known to
the package's table of contents (and hence not automatically
removable). The advantage of using
.B @unexec
over a deinstallation script is that you can use the "special
sequence expansion" to get at files regardless of where they've
been potentially redirected (see
.B -p)
.TP
.BI "@mode\ " mode
Sets default permission for all subsequently extracted files to